You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In here, it uses readdirp to list directories to walk through, but the walk is missing folders such as platforms, sources, system-images and those folders are all symlinked (due to how android studio does things).
This is very annoying, definitely a bug.
Command Output:
native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_HOME +0ms
native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_SDK_ROOT +2ms
native-run:android:utils:sdk:resolveSDKRoot Using $ANDROID_SDK_ROOT at /usr/local/Cellar/android-sdk/24 +2ms
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 /Users/penn/.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 /Users/penn/.android/avd +1ms
native-run:android:utils:sdk:findAllSDKPackages Walking /usr/local/Cellar/android-sdk/24 to discover SDK packages +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/emulator/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/platform-tools/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/tools/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/build-tools/30.0.2/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/build-tools/34.0.0-rc3/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/cmdline-tools/latest/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/patcher/v4/package.xml +0ms
native-run:android:utils:sdk:api:getAPILevels Discovered installed API Levels: [] +0ms
SDK Location: /usr/local/Cellar/android-sdk/24
AVD Home: /Users/pencilcheck/.android/avd
Tools:
Android Emulator emulator 32.1.12
Android SDK Build-Tools 30.0.2 build-tools;30.0.2 30.0.2
Android SDK Build-Tools 34-rc3 build-tools;34.0.0-rc3 34.0.0
Android SDK Command-line Tools (latest) cmdline-tools;latest 9.0
Android SDK Platform-Tools platform-tools 34.0.1
Android SDK Tools tools 26.1.1
SDK Patch Applier v4 patcher;v4 1
SDK Info:
native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_HOME +0ms
native-run:android:utils:sdk:resolveSDKRoot Looking for $ANDROID_SDK_ROOT +2ms
native-run:android:utils:sdk:resolveSDKRoot Using $ANDROID_SDK_ROOT at /usr/local/Cellar/android-sdk/24 +2ms
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 /Users/penn/.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 /Users/penn/.android/avd +1ms
native-run:android:utils:sdk:findAllSDKPackages Walking /usr/local/Cellar/android-sdk/24 to discover SDK packages +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/emulator/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/platform-tools/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/tools/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/build-tools/30.0.2/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/build-tools/34.0.0-rc3/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/cmdline-tools/latest/package.xml +0ms
native-run:android:utils:sdk:getSDKPackage Parsing /usr/local/Cellar/android-sdk/24/patcher/v4/package.xml +0ms
native-run:android:utils:sdk:api:getAPILevels Discovered installed API Levels: [] +0ms
SDK Location: /usr/local/Cellar/android-sdk/24
AVD Home: /Users/pencilcheck/.android/avd
Tools:
Android Emulator emulator 32.1.12
Android SDK Build-Tools 30.0.2 build-tools;30.0.2 30.0.2
Android SDK Build-Tools 34-rc3 build-tools;34.0.0-rc3 34.0.0
Android SDK Command-line Tools (latest) cmdline-tools;latest 9.0
Android SDK Platform-Tools platform-tools 34.0.1
Android SDK Tools tools 26.1.1
SDK Patch Applier v4 patcher;v4 1
The text was updated successfully, but these errors were encountered:
pencilcheck
changed the title
native-run is using outdated ways to find api-levels in SDK packages
native-run doesn't handle symlinks in SDK, thus missing critical information
Apr 16, 2023
pencilcheck
changed the title
native-run doesn't handle symlinks in SDK, thus missing critical information
native-run doesn't walk symlinks in SDK packages, thus cannot detect API levels
Apr 16, 2023
Version:
1.7.2
Description:
Native-run can't find the installed API levels in my SDK when it is perfectly fine in Android studio.
And as a bonus, I dig through the source code, turns out it is walking through every folders and find package.xml to find api-level string in them
https://github.com/ionic-team/native-run/blob/88a49944427f1bd4a33e6f53d511f9c49330ebe6/src/android/utils/sdk/index.ts
In here, it uses readdirp to list directories to walk through, but the walk is missing folders such as platforms, sources, system-images and those folders are all symlinked (due to how android studio does things).
This is very annoying, definitely a bug.
Command Output:
SDK Info:
The text was updated successfully, but these errors were encountered: