Cannot find detected devices


I already had Android Studio installed with two Android Virtual Devices.

After I installed NativeScript and created an app and then tried to run tns run android, I get:

Starting Android emulator with image Nexus_10_API_24
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’.

I tried with the timeout switch, same deal.
I doubled the RAM on the Nexus 10 avd.
When I run tns device it can’t find anything.
tns doctor says Your components are up-to-date: nativescript,tns-core-modules,tns-android,tns-ios
Running tns device android --available-devices I get
Available emulators
│ Device Name │ Platform │ Version │ Device Identifier │
│ Nexus 10 │ Android │ android-24 │ Nexus_10_API_24 │
│ Nexus 6 │ Android │ android-24 │ Nexus_6_API_24 │
Not sure what to do next…


This is an indication that your emulator starts too slowly for the tns process to wait out. Instead of a cold start, try booting up the emulator in advance from Android Studio. Once it’s up, do tns run android.


Or use Genymotion it is way faster.


In my experience, it used to be, a year ago. Since then the ADB emulators have caught up significantly, and have worked way better for me.


Oh, guess I should give it a try today.
Thanks @Pete.K :slight_smile:


I can’t load them in Android Studio anymore either. Used to be able to (used to develop in Android Studio). Maybe the nativescript install broke something?


Well I reinstalled Android studio and that seemed to fix the problem. Not sure what happened.