I've scoured SO and Google and none of the suggestions have seemed to solve my issue.
I previously had Android Studio on this Mac. I decided to finally add nativescript and followed the docs 100%. I also updated Android Studio in the process. Keep in mind, I've also tried completely removing Android Studio and re-installing it manually. Nothing has change the results/symptoms that I'm experiencing below.
I'm actually getting two errors. One within Android Studio with a Pixel 2 8.0, Pixel 2 XL 8.0, Pixel 2 9.0 and Pixel 2 XL 9.0 emulators (newly created within Android Studio). The second error is when I attempt to run tns run android
. It's also important to note that running tns run ios
works perfectly and X Code opens and fires up an emulator perfectly.
Lastly, I want to share that I've tried to update my bash profile with both of the following suggestions found throughout the various similar issues online.
export ANDROID_HOME=/usr/local/share/android-sdk
export ANDROID_HOME=/Users/$myUsername/Library/Android/sdk
I updated and forced my updated exports with source ~/.bash_profile
and have restarted my terminal and mac multiple times throughout my efforts to resolve this issue.
Lastly, I've also tried with Android Studio open and with Android Studio closed.
That said, here goes.
- Android Studio Error
- Open up AVD Manager and try to start any of my emulators.
- Immediately the following error appears...
- Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value
NOTES FOR ERROR 1: The path it suggests is a path I have verified contains the Android SDK. This is also the path that is set for my SDK inside Android Studio > SDK Manager > Android SDK > Android SDK Location.
- Command Line Error w/NativeScript CLI
- I run
tns run android
- It seems to try to run its processes just fine. It comes up with one of my devices/emulators setup with Android SDK. It shows the device name correctly inside the command line.
- The process seems to hang at this point for quite some time. Eventually it does die out with the following notes/errors.
- I run
Cannot find connected devices. Emulator start failed with: Cannot run your app in the native emulator. Increase the timeout of the operation with the --timeout option or try to restart your adb server with 'adb kill-server' command. Alternatively, run the Android Virtual Device manager and increase the allocated RAM for the virtual device. To list currently connected devices and verify that the specified identifier exists, run 'tns device'. To list available emulator images, run 'tns device --available-devices'.
Thanks in advance. I've redone all of this multiple times but I just can't get android emulators to work at all now that I've finally tried to setup a NativeScript workspace on this machine.