"meteor run android" results in black, blank emulator screen

On my Mac (El Capitan) with Meteor 1.2.1 I have installed Android Studio, installed v22 APIs, installed the x86_64 system image, created an AVD, etc.

When I execute meteor run android --verbose the emulator starts but I get just a black screen. I waited a long time to see if anything else would happen; it did not. The command just spins its wheels at “Starting App on Android Emulator”.

Running the AVD manually in the AVD Manager launches it just fine.

Log included below but is there anywhere else I could be looking for clues?

Getting installed version for platform android in Cordova project
Checking Cordova requirements for platform Android
[[[[[ ~/Projects/whatsapp ]]]]]

=> Started proxy.
=> Started MongoDB.
Local package version is up-to-date: angular@1.0.4
Local package version is up-to-date: angular:angular@1.4.7
Local package version is up-to-date: angular:angular-animate@1.4.7
Local package version is up-to-date: angular:angular-sanitize@1.4.7
Local package version is up-to-date: angularui:angular-ui-router@0.2.15
Local package version is up-to-date: autopublish@1.0.4
Local package version is up-to-date: autoupdate@1.2.4
Local package version is up-to-date: babel-compiler@5.8.24_1
Local package version is up-to-date: babel-runtime@0.1.4
Local package version is up-to-date: base64@1.0.4
Local package version is up-to-date: binary-heap@1.0.4
Local package version is up-to-date: blaze@2.1.3
Local package version is up-to-date: blaze-html-templates@1.0.1
Local package version is up-to-date: blaze-tools@1.0.4
Local package version is up-to-date: boilerplate-generator@1.0.4
Local package version is up-to-date: caching-compiler@1.0.0
Local package version is up-to-date: caching-html-compiler@1.0.2
Local package version is up-to-date: callback-hook@1.0.4
Local package version is up-to-date: check@1.1.0
Local package version is up-to-date: dburles:mongo-collection-instances@0.3.4
Local package version is up-to-date: ddp@1.2.2
Local package version is up-to-date: ddp-client@1.2.1
Local package version is up-to-date: ddp-common@1.2.2
Local package version is up-to-date: ddp-server@1.2.2
Local package version is up-to-date: deps@1.0.9
Local package version is up-to-date: diff-sequence@1.0.1
Local package version is up-to-date: driftyco:ionic@1.1.0_2
Local package version is up-to-date: ecmascript@0.1.6
Local package version is up-to-date: ecmascript-runtime@0.2.6
Local package version is up-to-date: ejson@1.0.7
Local package version is up-to-date: es5-shim@4.1.14
Local package version is up-to-date: fastclick@1.0.7
Local package version is up-to-date: geojson-utils@1.0.4
Local package version is up-to-date: hot-code-push@1.0.0
Local package version is up-to-date: html-tools@1.0.5
Local package version is up-to-date: htmljs@1.0.5
Local package version is up-to-date: http@1.1.1
Local package version is up-to-date: id-map@1.0.4
Local package version is up-to-date: insecure@1.0.4
Local package version is up-to-date: jquery@1.11.4
Local package version is up-to-date: lai:collection-extensions@0.1.4
Local package version is up-to-date: launch-screen@1.0.4
Local package version is up-to-date: livedata@1.0.15
Local package version is up-to-date: logging@1.0.8
Local package version is up-to-date: meteor@1.1.10
Local package version is up-to-date: meteor-base@1.0.1
Local package version is up-to-date: minifiers@1.1.7
Local package version is up-to-date: minimongo@1.0.10
Local package version is up-to-date: mobile-experience@1.0.1
Local package version is up-to-date: mobile-status-bar@1.0.6
Local package version is up-to-date: mongo@1.1.3
Local package version is up-to-date: mongo-id@1.0.1
Local package version is up-to-date: npm-mongo@1.4.39_1
Local package version is up-to-date: observe-sequence@1.0.7
Local package version is up-to-date: ordered-dict@1.0.4
Local package version is up-to-date: promise@0.5.1
Local package version is up-to-date: random@1.0.5
Local package version is up-to-date: reactive-dict@1.1.3
Local package version is up-to-date: reactive-var@1.0.6
Local package version is up-to-date: reload@1.1.4
Local package version is up-to-date: retry@1.0.4
Local package version is up-to-date: routepolicy@1.0.6
Local package version is up-to-date: session@1.1.1
Local package version is up-to-date: spacebars@1.0.7
Local package version is up-to-date: spacebars-compiler@1.0.7
Local package version is up-to-date: standard-minifiers@1.0.2
Local package version is up-to-date: templating@1.1.5
Local package version is up-to-date: templating-tools@1.0.0
Local package version is up-to-date: tracker@1.0.9
Local package version is up-to-date: ui@1.0.8
Local package version is up-to-date: underscore@1.0.4
Local package version is up-to-date: urigo:cancel-fastclick@0.0.2
Local package version is up-to-date: url@1.0.5
Local package version is up-to-date: webapp@1.2.3
Local package version is up-to-date: webapp-hashing@1.0.5
Preparing Cordova project from app bundle
Copying resources for mobile apps
Writing new config.xml
Preparing Cordova project for platform Android
Running Cordova app for platform Android with options --emulator
ANDROID_HOME=/Users/sturvey/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
=> Started your app.

=> App running at: http://localhost:3000/
WARNING : no emulator specified, defaulting to Meteor
Waiting for emulator...
HAXM is working and emulator runs in fast virt mode
emulator: emulator window was out of view and was recentered

emulator: UpdateChecker: skipped version check
Starting app on Android Emulator

I shall reply to my own post with the fix!

I enabled the Use Host GPU option in the AVD and, after taking an eternity to download gradle, it started.

Hope this helps someone else.

Thanks @simon.turvey. Thanks for sharing the solution :slight_smile:

I’m lost. You checked “Use Host GPU” only or you also had to download Gradle?

No. “meteor run android” downloads gradle as part of its first-time-launch process. I was just commenting that the gradle distribution package sits on a slow-as-molasses server/link.

How long is this eternity thou speak of? My eternity lasts an hour now, and no signs of network activity. CPU#0 at 100%, emulator blank / black screen.

I’m not sure if it will help, since it is done on Linux (Xubuntu), but I figured out how a way to test Android apps without all the folderol of the SDK and emulator.

To see what I did, you can follow the slide show Automated Deployment while watching the accompanying 08:24 minute video Meteor / CircleCI Tutorial – #10 Automated Deployment . Then watch the 05:34 minute video Debug your Android App in a Virtual Machine.

The main ideas are :

  • Load only what Meteor needs
  • Use Android-x86 KitKat in a virtual machine (Qemu/KVM in my case)
  • Debug with Chrome while running your meteor run android-device through ADB to Android in a virtual machine.