native-run: `native-run` can't find my installed SDK Platforms
Version:
1.6.0
, installed globally from NPM
Description:
native-run
never manages to locate my installed API levels, failing with ERR_UNSUITABLE_API_INSTALLATION
every time.
I install both Android Studio and Android SDK using Scoop (https://github.com/ScoopInstaller/Scoop), but I’ve beeing doing it this way for ages and never had issues like this before.
the latest Android SDK tools are starting to require Java 11, so I install and switch JDK versions using Jabba (https://github.com/shyiko/jabba, also installed using Scoop) and I’ve already updated my environment variable to include the new cmdline-tools
folder (with the updated sdkmanager
and avdmanager
tools) in my PATH
variable.
I don’t think I’ve done anything funky in my system configuration here, so is this a bug in native-run
? perhaps as a result of something changing from Google’s side of things?
Command Output:
running the command npx native-run android --list --verbose
presents the following:
native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_HOME +0ms
native-run:android:utils:sdk:resolveSDKRoot Using $ANDROID_HOME at C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current +6ms
native-run:android:utils:sdk:resolveEmulatorHome Looking for $ANDROID_EMULATOR_HOME +0ms
native-run:android:utils:sdk:resolveEmulatorHome Looking at $HOME/.android +0ms
native-run:android:utils:sdk:resolveEmulatorHome Using $HOME/.android/ at C:\Users\agreeff.NORTECHZA\.android +1ms
native-run:android:utils:sdk:resolveAVDHome Looking for $ANDROID_AVD_HOME +0ms
native-run:android:utils:sdk:resolveAVDHome Looking at $HOME/.android/avd +1ms
native-run:android:utils:sdk:resolveAVDHome Using $HOME/.android/avd/ at C:\Users\agreeff.NORTECHZA\.android\avd +0ms
native-run:android:utils:adb:getDevices Invoking adb with args: [ 'devices', '-l' ] +0ms
native-run:android:utils:sdk:getSDKPackage Parsing C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current\platform-tools\package.xml +0ms
native-run:android:utils:avd:getAVDINIs Discovered AVD ini files: [
native-run:android:utils:avd:getAVDINIs 'C:\\Users\\agreeff.NORTECHZA\\.android\\avd\\Pixel_4_API_23.ini',
native-run:android:utils:avd:getAVDINIs 'C:\\Users\\agreeff.NORTECHZA\\.android\\avd\\Pixel_4_API_30.ini',
native-run:android:utils:avd:getAVDINIs 'C:\\Users\\agreeff.NORTECHZA\\.android\\avd\\Pixel_4_API_31.ini',
native-run:android:utils:avd:getAVDINIs 'C:\\Users\\agreeff.NORTECHZA\\.android\\avd\\Pixel_4_API_32.ini'
native-run:android:utils:avd:getAVDINIs ] +0ms
native-run:android:utils:sdk:findAllSDKPackages Walking C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current to discover SDK packages +0ms
native-run:android:utils:sdk:api:getAPILevels Discovered installed API Levels: [] +0ms
native-run:android:utils:adb:parseAdbDevices Parsing adb devices from output lines: [ 'List of devices attached', '', '' ] +0ms
native-run:android:utils:adb:getDevices Found adb devices: [] +401ms
Errors (!):
ERR_UNSUITABLE_API_INSTALLATION: No suitable API installation found. Use --sdk-info to reveal missing packages and other issues.
More details for this error may be available online:
https://github.com/ionic-team/native-run/wiki/Android-Errors
Connected Devices:
No connected devices found
Virtual Devices:
No virtual devices found
meanwhile, the command avdmanager list target
presents the following:
Warning: Observed package id 'platforms;android-32' in inconsistent location 'C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current\platforms\android-32-2' (Expected 'C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current\platforms\android-32')
Available Android targets:==============] 100% Fetch remote repository...
----------
id: 1 or "android-30"
Name: Android API 30
Type: Platform
API level: 30
Revision: 3
----------
id: 2 or "android-31"
Name: Android API 31
Type: Platform
API level: 31
Revision: 1
----------
id: 3 or "android-32"
Name: Android API 32
Type: Platform
API level: 32
Revision: 1
ans lastly, the command sdkmanager --list_installed
presents the following:
Warning: Observed package id 'platforms;android-32' in inconsistent location 'C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current\platforms\android-32-2' (Expected 'C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current\platforms\android-32')
Warning: Observed package id 'platforms;android-32' in inconsistent location 'C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current\platforms\android-32-2' (Expected 'C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current\platforms\android-32')
Installed packages:=====================] 100% Fetch remote repository...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;30.0.3 | 30.0.3 | Android SDK Build-Tools 30.0.3 | build-tools\30.0.3
build-tools;31.0.0 | 31.0.0 | Android SDK Build-Tools 31 | build-tools\31.0.0
build-tools;32.0.0 | 32.0.0 | Android SDK Build-Tools 32 | build-tools\32.0.0
cmdline-tools;latest | 7.0 | Android SDK Command-line Tools (latest) | cmdline-tools\latest
emulator | 31.3.10 | Android Emulator | emulator
extras;intel;Hardware_Accelerated_Execution_Manager | 7.6.5 | Intel x86 Emulator Accelerator (HAXM installer) | extras\intel\Hardware_Accelerated_Execution_Manager
patcher;v4 | 1 | SDK Patch Applier v4 | patcher\v4
platform-tools | 33.0.3 | Android SDK Platform-Tools 33.0.3 | platform-tools
platforms;android-30 | 3 | Android SDK Platform 30 | platforms\android-30
platforms;android-31 | 1 | Android SDK Platform 31 | platforms\android-31
platforms;android-32 | 1 | Android SDK Platform 32 | platforms\android-32-2
sources;android-32 | 1 | Sources for Android 32 | sources\android-32
system-images;android-22;google_apis;x86_64 | 26 | Google APIs Intel x86 Atom_64 System Image | system-images\android-22\google_apis\x86_64
system-images;android-23;google_apis;x86_64 | 33 | Google APIs Intel x86 Atom_64 System Image | system-images\android-23\google_apis\x86_64
system-images;android-24;google_apis_playstore;x86 | 19 | Google Play Intel x86 Atom System Image | system-images\android-24\google_apis_playstore\x86
system-images;android-25;google_apis_playstore;x86 | 9 | Google Play Intel x86 Atom System Image | system-images\android-25\google_apis_playstore\x86
system-images;android-26;google_apis_playstore;x86 | 7 | Google Play Intel x86 Atom System Image | system-images\android-26\google_apis_playstore\x86
system-images;android-27;google_apis_playstore;x86 | 3 | Google Play Intel x86 Atom System Image | system-images\android-27\google_apis_playstore\x86
system-images;android-28;google_apis_playstore;x86_64 | 8 | Google Play Intel x86 Atom_64 System Image | system-images\android-28\google_apis_playstore\x86_64
system-images;android-29;google_apis_playstore;x86_64 | 8 | Google Play Intel x86 Atom_64 System Image | system-images\android-29\google_apis_playstore\x86_64
system-images;android-30;google_apis_playstore;x86 | 9 | Google Play Intel x86 Atom System Image | system-images\android-30\google_apis_playstore\x86
system-images;android-30;google_apis_playstore;x86_64 | 10 | Google Play Intel x86 Atom_64 System Image | system-images\android-30\google_apis_playstore\x86_64
system-images;android-31;google_apis_playstore;x86_64 | 9 | Google Play Intel x86 Atom_64 System Image | system-images\android-31\google_apis_playstore\x86_64
system-images;android-32;google_apis_playstore;x86_64 | 3 | Google Play Intel x86 Atom_64 System Image | system-images\android-32\google_apis_playstore\x86_64
tools | 26.1.1 | Android SDK Tools 26.1.1 | tools
SDK Info:
output of the command npx native-run --sdk-info --verbose
:
native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_HOME +0ms
native-run:android:utils:sdk:resolveSDKRoot Using $ANDROID_HOME at C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current +4ms
native-run:android:utils:sdk:resolveEmulatorHome Looking for $ANDROID_EMULATOR_HOME +0ms
native-run:android:utils:sdk:resolveEmulatorHome Looking at $HOME/.android +1ms
native-run:android:utils:sdk:resolveEmulatorHome Using $HOME/.android/ at C:\Users\agreeff.NORTECHZA\.android +0ms
native-run:android:utils:sdk:resolveAVDHome Looking for $ANDROID_AVD_HOME +0ms
native-run:android:utils:sdk:resolveAVDHome Looking at $HOME/.android/avd +0ms
native-run:android:utils:sdk:resolveAVDHome Using $HOME/.android/avd/ at C:\Users\agreeff.NORTECHZA\.android\avd +1ms
native-run:android:utils:sdk:findAllSDKPackages Walking C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current to discover SDK packages +0ms
native-run:android:utils:sdk:api:getAPILevels Discovered installed API Levels: [] +0ms
SDK Location: C:\Users\agreeff.NORTECHZA\scoop\apps\android-sdk\current
AVD Home: C:\Users\agreeff.NORTECHZA\.android\avd
Tools:
…and no, that’s not a bad copy/paste here, the Tools:
section at the end is indeed completely empty.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (1 by maintainers)
I could solve it 😊 the reason was a missing emulator, or in my case a not startable emulator. I had to give user permissions to /dev/kvm.
Had I tried the build command instead of the run command, it probably would have worked the whole time.