0

Trying to create a NativeScript app, but having started up my emulator, tns device android --available-devices won't detect it: enter image description here My Android SDK is installed at /usr/local/android/sdk, and I've made sure to delete every other installation of it that exists. tns doctor returns no errors, so I assume that this isn't the issue. enter image description here It's probably worth mentioning that I'm using Kubuntu, which I'm pretty sure is the reason the emulator crashes if I click one of the side menu buttons, but I think that's unrelated. The emulator definitely exists too: enter image description here

If anyone has any ideas or needs anymore information, please don't hesitate to ask. Thank you so much!

2 Answers2

0

Are you sure you do not have conflicting SDK installations? I've experienced conflicting SDKs when I install NativeScript - ensure that NativeScript is pointed to the same SDK that Android Studio is using.

Have you checked your bash profile?

maw
  • 1
  • 1
  • Yep, bash profile points to the same android installation. I assume NativeScript uses whatever's in $ANDROID_HOME, right? – WubbaLubbaDubbDubb Feb 17 '20 at 18:45
  • I'm on a mac, but i have the following set: # ANDROID ENVS export ANDROID_HOME=/Users/$USER/Library/Android/sdk. export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk export ANDROID_AVD_HOME=/Users/$USER/.android/avd export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools export PATH=${PATH}:$ANDROID_HOME/tools/gradle/bin – maw Feb 17 '20 at 19:28
  • I think I've figured it out. Because I put my sdk in /usr/local/, I was using sudo to access it. Therefore, my emulator existed only for the root user. Running tns device with sudo fixed the issue and it was able to detect it. Thank you for your help! – WubbaLubbaDubbDubb Feb 17 '20 at 20:24
0

I'm on a mac, but i have the following set:

# ANDROID ENVS
export ANDROID_HOME=/Users/$USER/Library/Android/sdk.  
export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk
export ANDROID_AVD_HOME=/Users/$USER/.android/avd
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=${PATH}:$ANDROID_HOME/tools/gradle/bin
maw
  • 1
  • 1