I only get about 1-3 hours per week for my side projects, so apologies for running long on this topic. That said, I’m committed to resolving this issue and marking this thread as “FIXED”.
I’m ashamed to admit that I just found the --verbose
flag for meteor run android
and (obviously) this gives me more detail about what’s happening under the hood.
Ok, so I’m working with the leaderboard to get spun up, and here’s my environment :
my-laptop:leaderboard me$ android list avd
Available Android Virtual Devices:
Name: my-avd
Device: Nexus 4 (Google)
Path: /Users/me/.android/avd/my-avd.avd
Target: Android 6.0 (API level 23)
Tag/ABI: default/x86_64
Skin: 768x1280
my-laptop:leaderboard me$ meteor --version
Meteor 1.3.4.4
The first time I ran, with verbose, I had this result :
* What went wrong:
A problem occurred configuring root project 'android'.
> failed to find Build Tools revision 24.0.1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.982 secs
Error code 1 for command: /Users/me/Desktop/github/me/tutorials/leaderboard/.meteor/local/cordova-build/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/me/Desktop/github/me/tutorials/leaderboard/.meteor/local/cordova-build/platforms/android/build.gradle,-PcdvBuildArch=x86,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true undefined
=> Errors executing Cordova commands:
While running Cordova app for platform Android with options --emulator:
Error: Command failed: /Users/me/Desktop/github/me/tutorials/leaderboard/.meteor/local/cordova-build/platforms/android/cordova/run --emulator
at ChildProcess.exitCallback (/tools/utils/processes.js:151:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
/Users/me/.meteor/packages/meteor-tool/.1.3.4_4.yd8cgw++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/isopackets/cordova-support/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:165
throw error;
^
ExitWithCode:1
Comparing this error against a discussion on StackOverflow leads me to believe I need to install Build Tools 24.0.1 . The arguments are a bit different, but at this point 24.0.1 is option #5 and the command looks like this :
android update sdk -a -u -t 5
After reinstalling the Android SDK tools, I again run Meteor :
my-laptop:leaderboard me$ meteor run android --verbose
Getting installed version for platform android in Cordova project
Getting installed version for platform ios in Cordova project
Checking Cordova requirements for platform Android
[[[[[ ~/Desktop/github/me/tutorials/leaderboard ]]]]]
=> Started proxy.
=> Meteor 1.4.1.1 is available. Update this project with 'meteor update'.
=> Started MongoDB.
Local package version is up-to-date: allow-deny@1.0.5
Local package version is up-to-date: autopublish@1.0.7
Local package version is up-to-date: autoupdate@1.2.11
Local package version is up-to-date: babel-compiler@6.8.4
(trimming large amount of output)
% updated project successfully
% Executing "after_prepare" hook for all plugins.
Running Cordova app for platform Android with options --emulator
ANDROID_HOME=/Users/me/Library/Android/sdk/
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
=> Started your app.
=> App running at: http://localhost:3000/
No emulator specified, defaulting to my-avd -
Waiting for emulator...
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 476MB
Hax is enabledp on Android Emulator \
Hax ram_size 0x77300000
HAX is working and emulator runs in fast virt mode.
console on port 5554, ADB on port 5555 \
Unfortunately, the app still doesn’t launch. The emulator launches and shows a typical Android home screen :
I work with many Java environments, so I decide to validate my assumptions :
my-laptop:leaderboard me$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
Although JAVA_HOME points to Java 1.8, maybe java
on my path is part of the issue? Let’s fix that.
my-laptop:leaderboard me$ jenv local 1.8
my-laptop:leaderboard me$ java -version
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
Ok, so now we have the proper Java version, let’s run it again
my-laptop:leaderboard me$ meteor run android --verbose
Getting installed version for platform android in Cordova project
Getting installed version for platform ios in Cordova project
Checking Cordova requirements for platform Android
[[[[[ ~/Desktop/github/me/tutorials/leaderboard ]]]]]
=> Started proxy.
=> Meteor 1.4.1.1 is available. Update this project with 'meteor update'.
=> Started MongoDB.
Local package version is up-to-date: allow-deny@1.0.5
Local package version is up-to-date: autopublish@1.0.7
Local package version is up-to-date: autoupdate@1.2.11
(trimming large amount of output)
% copying image from /Users/me/Desktop/github/me/tutorials/leaderboard/.meteor/local/cordova-build/resources/android_xhdpi_landscape.splash.png to /Users/me/Desktop/github/me/tutorials/leaderboard/.meteor/local/cordova-build/platforms/android/res/drawable-land-xhdpi/screen.png
% updated project successfully
% Executing "after_prepare" hook for all plugins.
Running Cordova app for platform Android with options --emulator
ANDROID_HOME=/Users/me/Library/Android/sdk/
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
=> Started your app.
=> App running at: http://localhost:3000/
No emulator specified, defaulting to my-avd -
Waiting for emulator...
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 476MB
Hax is enabledp on Android Emulator -
Hax ram_size 0x77300000
HAX is working and emulator runs in fast virt mode.
console on port 5554, ADB on port 5555 \
Starting app on Android Emulator |
Unfortunately, still no “leaderboard” displayed when the emulator starts :
`
At this point, I figured, what the heck, lets update to Meteor 1.4.1.1 and see if that makes a difference.
my-laptop:leaderboard me$ meteor update
Changes to your project's package version selections from updating the release:
babel-compiler upgraded from 6.8.4 to 6.9.1
babel-runtime upgraded from 0.1.9_1 to 0.1.11
ecmascript upgraded from 0.4.7 to 0.5.8
ecmascript-runtime upgraded from 0.2.12 to 0.3.14
logging upgraded from 1.0.14 to 1.1.15
meteor upgraded from 1.1.16 to 1.2.17
minifier-css upgraded from 1.1.13 to 1.2.14
minifier-js upgraded from 1.1.13 to 1.2.14
modules upgraded from 0.6.5 to 0.7.6
modules-runtime upgraded from 0.6.5 to 0.7.6
mongo upgraded from 1.1.9_1 to 1.1.12
npm-mongo upgraded from 1.4.45 to 1.5.48
promise upgraded from 0.7.3 to 0.8.4
standard-minifier-css upgraded from 1.0.8 to 1.2.0
standard-minifier-js upgraded from 1.0.8 to 1.2.0
tracker upgraded from 1.0.14 to 1.1.0
webapp upgraded from 1.2.10 to 1.3.11
leaderboard: updated to Meteor 1.4.1.1.
Changes to your project's package version selections from updating package versions:
ddp-server upgraded from 1.2.9 to 1.2.10
npm-mongo upgraded from 1.5.48 to 1.5.49
shell-server added, version 0.2.1
templating upgraded from 1.1.13 to 1.1.14
Newer versions of the following indirect dependencies are available:
* autoupdate 1.2.11 (1.3.11 is available)
* caching-compiler 1.0.6 (1.1.7 is available)
* ddp-client 1.2.9 (1.3.1 is available)
* ddp-server 1.2.10 (1.3.10 is available)
* http 1.1.8 (1.2.9 is available)
* templating 1.1.14 (1.2.14 is available)
To update one or more of these packages, pass their names to
`meteor update`, or just run `meteor update --all-packages`.
After updating Meteor, I run it again :
my-laptop:leaderboard me$ meteor run android --verbose
Getting installed version for platform android in Cordova project
Getting installed version for platform ios in Cordova project
Checking Cordova requirements for platform Android
[[[[[ ~/Desktop/github/me/tutorials/leaderboard ]]]]]
=> Started proxy.
Your development database is using mmapv1, the old, pre-MongoDB 3.0 database engine. You should consider upgrading to Wired Tiger, the new engine. The easiest way to do so in development is to run
meteor reset. If you'd like to migrate your database, please consult https://docs.mongodb.org/v3.0/release-notes/3.0-upgrade/
=> Started MongoDB.
(trimming large amount of output)
copying image from /Users/me/Desktop/github/me/tutorials/leaderboard/.meteor/local/cordova-build/resources/android_xhdpi_landscape.splash.png to /Users/me/Desktop/github/me/tutorials/leaderboard/.meteor/local/cordova-build/platforms/android/res/drawable-land-xhdpi/screen.png
%% updated project successfully
%% Executing "after_prepare" hook for all plugins.
Running Cordova app for platform Android with options --emulator
ANDROID_HOME=/Users/me/Library/Android/sdk|
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
=> Started your app.
=> App running at: http://localhost:3000/
No emulator specified, defaulting to my-avd /
Waiting for emulator...
emulator: WARNING: VM heap size set below hardware specified minimum of 128MB
emulator: WARNING: Setting VM heap size to 476MB
Hax is enabledp on Android Emulator -
Hax ram_size 0x77300000
HAX is working and emulator runs in fast virt mode.
console on port 5554, ADB on port 5555 |
Starting app on Android Emulator
Sadly, still no leaderboard application :
Sigh… time to give up for the evening.
Am I missing something obvious? Is there a magical command like meteor run android --and-launch-client
? Any help is greatly appreciated!
cc/ @robfallows