George Edwards George Edwards - 7 months ago 46
Android Question

How to set the default Android Emulator

I am building an app with NativeScript, where I run:

$ tns run android --emulator

to build the app and launch it in an emulator. When I do this, the default android emulator boots on my machine, which is unusably slow...

In all the demos, they are using the Genymotion Emulator. I have installed this, but the NativeScript command still launches the default emulator. How do I get this to launch on the genymotion emulator?

NB: I am using Windows 10


Even if I run the command with the Genymotion emulator running (and nothing else), I get the following log output and a new terminal window is opened running


Total time: 11.959 secs

Project successfully built.

Using C:\Users\George\Source\Repos\NativeScript-App\Bluetooth\platforms\android\build\outputs\apk\bluetoothdemo-debug.apk

Starting Android emulator with image Xamarin_Android_API_23

That looks as though it is referencing the emulator I had been using when I was developing with Xamarin. Any ideas where I can change that, or why that is being called?


start Genymotion, then start one of the devices that you have setup in Genymotion

then check that the device is seen: $ tns device

then run nativescript like so $tns run android --geny

(or whatever is the name that you get from the tns device command)