Errors Building Android App on Mac OS 10.7

Hello,

I’m new to meteor. Just trying to get through the simple todo tutorial on my macbook running OS 10.7.

I got to the step “meteor run android” but then get the error below.
Been working for hours trying to figure this out. Would very much appreciate some help to resolve this.

Thanks

=> Started your app.

=> App running at: http://localhost:3000/
=> Errors executing Cordova commands:

While running Cordova app for platform Android with options --emulator:
Error: Command failed: /Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --emulator
/Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error executing “adb devices”:
at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)

ExitWithCode:1

So it seemed like the version of adb installed by the latest android API isn’t compatible with OS 10.7. When running adb directly I was getting an Illegal argument 4 error which after some research seems to be telling me it is not made for my OS. I am now running an older version of adb which at least runs now.

New error now. See below.

Starting app on Android Emulator -
/Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
ERROR : No emulator images (avds) found.

  1. Download desired System Image by running: /Users/joe/Library/Android/sdk/tools/android sdk
  2. Create an AVD by running: /Users/joe/Library/Android/sdk/tools/android avd
    HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

=> Errors executing Cordova commands:

While running Cordova app for platform Android with options --emulator:
Error: Command failed: /Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --emulator

at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)

ExitWithCode:1

Now I have created an emulator finally. Intel based AVDs don’t seem to work on OS 10.7 so I finally found a combination that gave me a ARM Nexus 7 AVD. I don’t know why it is telling me “No emulator images found”.

Also when I try to run
/Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --emulator
directly I get this error

env: node: No such file or directory

Don’t know what to do at this point. Please help!

Hmmm, it seems this incompatibility with OS X 10.7 is a known issue with the current Android tools. What version did you manage to install?

I’m not sure why Intel based AVDs don’t work and if there is something you can do about it, but without HAXM acceleration I’m afraid the emulator will be so slow it is practically unusable. You would be better off testing on a device. Also, you’ll have to make sure the AVD is created using API 22.

(Running the platforms/android/cordova/run command directly requires Node to be in the path. Meteor includes its own version of Node, but doesn’t install it globally.)

Does the meteor or android sdk install Node? I’ll see if I can get a little further if I get a compatible Node installed.

Is there any other way to compile the app? I see Meteor now has build servers and I was able to log into one but didn’t know what to do after that to have it build the app.

I got a little closer after installing Node.js. I still got the same error (below) message but if I run

/Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --emulator

the emulator does launch and gives me this message:

ANDROID_HOME=/Users/joe/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
WARNING : no emulator specified, defaulting to Nexus7-ARM

Preparing Cordova project for platform Android
Running Cordova app for platform Android with options --emulator
ANDROID_HOME=/Users/joe/Library/Android/sdk |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
Starting app on Android Emulator |
/Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
ERROR : No emulator images (avds) found.

  1. Download desired System Image by running: /Users/joe/Library/Android/sdk/tools/android sdk
  2. Create an AVD by running: /Users/joe/Library/Android/sdk/tools/android avd
    HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

=> Errors executing Cordova commands:

While running Cordova app for platform Android with options --emulator:
Error: Command failed: /Users/joe/simple-todos/.meteor/local/cordova-build/platforms/android/cordova/run --emulator

at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)

ExitWithCode:1

I gave up on getting Meteor to work on Mac OS 10.7. Think the Meteor folks need to add a disclaimer that building the app on 10.7 doesn’t work. Luckily I had a 20GB partition that I installed Ubuntu on. Got things working there fine.

Same error here but I do not have a Ubuntu… Will that be resolved in the future?