I am creating a PhoneGap app using WebStorm (PhoneGap/Cordova App) on a Mac. The problem I have is that the app does not appear in the Android emulator. The emulator appears but the screen with the word "android" does not change to reveal the app:
I have followed the instructions on the Cordova site for Android setup on a Mac:
This is the emulator setup:
I have tried activating and deactivating "Use Host GPU" as per the answers and comments to this question to no use - Android emulator shows nothing except black screen and adb devices shows "device offline"
The app appears and works correctly when I choose "browser" as the Platform in the configuration:
Any ideas what else I need to do?
Edit 1: This is the log information when running in verbose mode as suggested by @Dar
Running command: /Users/username/Documents/Projects/harkme/platforms/browser/cordova/run --emulator
Static file server running @ http://localhost:8000/index.html
CTRL + C to shut down
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.3.4/
JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home > No emulator specified, defaulting to AVD_for_Galaxy_Nexus_by_Google
Waiting for emulator...
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 256MB
Hax is enabled
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
console on port 5554, ADB on port 5555
Edit 2:
Enabling HAXM as mentioned by @Dar speeds up the emulator greatly to the extent that the "android" page disappears after a few seconds to show the desktop but the app is not installed. However, I found that if I dragged the app from the build folder onto the desktop the app installed. The app file (android-debug.apk) is located in:
platforms/android/build/outputs/apk
This procedure actually (accidentally) improved my workflow as I now just build the app and drag it onto the emulator instead of doing a PhoneGap/Cordova run from WebStorm after making changes to test the app.
I also changed the emulator setup to this:
Edit 3:
Sometimes when launching the emulator the following error appears
Unknown hax vcpu return 1
If it continues to do so, the only way to get round it, at the moment, is to restart the Mac, as suggested here - https://code.google.com/p/android/issues/detail?id=201694