3

I have installed Android Studio and Cordova. I have created a new Cordova project called myapp. I have set an emulator via Tools -> Android -> AVD Manager, choosing:

4.65" 720p (Galaxy Nexus)

The device shows up:

$ cordova run --list
Available android devices:
Available android virtual devices:
4.65_720p_(Galaxy_Nexus)_API_23

When I try to build and run the project on this emulator I get the following error message:

$ cordova emulate android
...
BUILD SUCCESSFUL

Total time: 1.284 secs
Built the following apk(s): 
    /home/daniel/cordova/myapp/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=/home/daniel/Android/Sdk
JAVA_HOME=/usr/lib/jvm/jre1.8.0_101
No emulator specified, defaulting to 4.65_720p_(Galaxy_Nexus)_API_23
Waiting for emulator to start...
emulator: ERROR: virtual device name contains invalid characters
emulator: could not find virtual device named '4.65_720p_(Galaxy_Nexus)_API_23'
gornvix
  • 3,154
  • 6
  • 35
  • 74

2 Answers2

11

Solution

The problem was with the name of the virtual device. I changed the name to "Galaxy Nexus" in the AVD Manager in Android Studio and the problem went away.

gornvix
  • 3,154
  • 6
  • 35
  • 74
6

Remove the parentesis from the virtual device name

Roberto
  • 4,524
  • 1
  • 38
  • 30