Meteor run android fails


#1

Hi,
I am using ubuntu 14.04. on running meteor run android on the basic simple application, I get the following errors:

anupama@ubuntu:~$ cd '/media/anupama/Data/MeteorProject/td’
anupama@ubuntu:/media/anupama/Data/MeteorProject/td$ sudo meteor run android
[sudo] password for anupama:
Error while running for mobile platforms: Error running
/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh

/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:126
throw e;
^
Error: ANDROID_HOME is not set and “android” command not in your PATH. You must
fulfill at least one of these conditions.
at
/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/lib/check_reqs.js:159:19
at _fulfilled
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:798:54)
at self.promiseDispatch.done
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:760:13)
at
/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:821:14
at flush
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:442:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:929:3
Error:
/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/create:
Command failed with exit code 8
at ChildProcess.whenDone
(/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)

Creating android project…

anupama@ubuntu:/media/anupama/Data/MeteorProject/td$ ^C
anupama@ubuntu:/media/anupama/Data/MeteorProject/td$ sudo meteor -v run android
% Parsing the --port option
% Will compile mobile builds
Local package version is up-to-date: autopublish@1.0.3
Local package version is up-to-date: autoupdate@1.2.1
Local package version is up-to-date: base64@1.0.3
Local package version is up-to-date: binary-heap@1.0.3
Local package version is up-to-date: blaze@2.1.2
Local package version is up-to-date: blaze-tools@1.0.3
Local package version is up-to-date: boilerplate-generator@1.0.3
Local package version is up-to-date: callback-hook@1.0.3
Local package version is up-to-date: check@1.0.5
Local package version is up-to-date: ddp@1.1.0
Local package version is up-to-date: deps@1.0.7
Local package version is up-to-date: ejson@1.0.6
Local package version is up-to-date: fastclick@1.0.3
Local package version is up-to-date: geojson-utils@1.0.3
Local package version is up-to-date: html-tools@1.0.4
Local package version is up-to-date: htmljs@1.0.4
Local package version is up-to-date: http@1.1.0
Local package version is up-to-date: id-map@1.0.3
Local package version is up-to-date: insecure@1.0.3
Local package version is up-to-date: jquery@1.11.3_2
Local package version is up-to-date: json@1.0.3
Local package version is up-to-date: launch-screen@1.0.2
Local package version is up-to-date: livedata@1.0.13
Local package version is up-to-date: logging@1.0.7
Local package version is up-to-date: meteor@1.1.6
Local package version is up-to-date: meteor-platform@1.2.2
Local package version is up-to-date: minifiers@1.1.5
Local package version is up-to-date: minimongo@1.0.8
Local package version is up-to-date: mobile-status-bar@1.0.3
Local package version is up-to-date: mongo@1.1.0
Local package version is up-to-date: observe-sequence@1.0.6
Local package version is up-to-date: ordered-dict@1.0.3
Local package version is up-to-date: random@1.0.3
Local package version is up-to-date: reactive-dict@1.1.0
Local package version is up-to-date: reactive-var@1.0.5
Local package version is up-to-date: reload@1.1.3
Local package version is up-to-date: retry@1.0.3
Local package version is up-to-date: routepolicy@1.0.5
Local package version is up-to-date: session@1.1.0
Local package version is up-to-date: spacebars@1.0.6
Local package version is up-to-date: spacebars-compiler@1.0.6
Local package version is up-to-date: templating@1.1.1
Local package version is up-to-date: tracker@1.0.7
Local package version is up-to-date: ui@1.0.6
Local package version is up-to-date: underscore@1.0.3
Local package version is up-to-date: url@1.0.4
Local package version is up-to-date: webapp@1.2.0
Local package version is up-to-date: webapp-hashing@1.0.3
% Running build for platforms: [ ‘android’ ]
Running command which jarsigner
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Running command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/anupama/.meteor/android_bundle/android-sdk/tools:/home/anupama/.meteor/android_bundle/android-sdk/platform-tools
ANDROID_SDK_HOME=/home/anupama/.meteor/android_bundle
/home/anupama/.meteor/android_bundle/android-sdk/build-tools/21.0.0/aapt version
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Running command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/anupama/.meteor/android_bundle/android-sdk/tools:/home/anupama/.meteor/android_bundle/android-sdk/platform-tools
ANDROID_SDK_HOME=/home/anupama/.meteor/android_bundle
/home/anupama/.meteor/android_bundle/android-sdk/tools/android list target
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Running command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/anupama/.meteor/android_bundle/android-sdk/tools:/home/anupama/.meteor/android_bundle/android-sdk/platform-tools
ANDROID_SDK_HOME=/home/anupama/.meteor/android_bundle
/home/anupama/.meteor/android_bundle/android-sdk/tools/android list avd
–compact
Found AVDS: [ ‘meteor’, ‘’ ]
Found /dev/kvm
% Building the cordova build project
% Bundling the web.cordova program of the app
% Ensuring the cordova build project
% Cordova build project doesn’t exist, creating one
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
% Running synchronously: /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh [ ‘create’, ‘cordova-build’, ‘com.meteor.userapps.td’, ‘td’ ]
% Reading the mobile control file
% Running the mobile control file
% Copying resources for mobile apps
% Writing new config.xml
% Ensuring that platforms in cordova build project are in sync
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
% Running synchronously: /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh [ ‘platform’, ‘list’ ]
% The output of cordova platforms list: Installed platforms:
Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos, ubuntu

% The platform is not in the Cordova project: android
Running command which jarsigner
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Running command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/anupama/.meteor/android_bundle/android-sdk/tools:/home/anupama/.meteor/android_bundle/android-sdk/platform-tools
ANDROID_SDK_HOME=/home/anupama/.meteor/android_bundle
/home/anupama/.meteor/android_bundle/android-sdk/build-tools/21.0.0/aapt version
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Running command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/anupama/.meteor/android_bundle/android-sdk/tools:/home/anupama/.meteor/android_bundle/android-sdk/platform-tools
ANDROID_SDK_HOME=/home/anupama/.meteor/android_bundle
/home/anupama/.meteor/android_bundle/android-sdk/tools/android list target
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
Running command
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/anupama/.meteor/android_bundle/android-sdk/tools:/home/anupama/.meteor/android_bundle/android-sdk/platform-tools
ANDROID_SDK_HOME=/home/anupama/.meteor/android_bundle
/home/anupama/.meteor/android_bundle/android-sdk/tools/android list avd
–compact
Found AVDS: [ ‘meteor’, ‘’ ]
Found /dev/kvm
% Adding a platform android
Using (built-in) Android SDK at /home/anupama/.meteor/android_bundle/android-sdk
% Running synchronously: /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh [ ‘platform’, ‘add’, ‘android’ ]
Error while running for mobile platforms: Error running
/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh

/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:126
throw e;
^
Error: ANDROID_HOME is not set and “android” command not in your PATH. You must
fulfill at least one of these conditions.
at
/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/lib/check_reqs.js:159:19
at _fulfilled
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:798:54)
at self.promiseDispatch.done
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:760:13)
at
/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:821:14
at flush
(/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:442:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:929:3
Error:
/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/create:
Command failed with exit code 8
at ChildProcess.whenDone
(/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)

Creating android project…

Error: Error running /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh

/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:126
throw e;
^
Error: ANDROID_HOME is not set and “android” command not in your PATH. You must fulfill at least one of these conditions.
at /home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/lib/check_reqs.js:159:19
at _fulfilled (/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:760:13)
at /home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:821:14
at flush (/home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:442:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:929:3
Error: /home/anupama/.meteor/android_bundle/.cordova/lib/npm_cache/cordova-android/3.6.4/package/bin/create: Command failed with exit code 8
at ChildProcess.whenDone (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)

Creating android project…

at execFileSyncOrThrow (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:272:11)
at /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:428:7
at Array.forEach (native)
at Function._.each._.forEach (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at ensureCordovaPlatforms (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:422:5)
at /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:796:5
at /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:327:18
at [object Object]._.extend.withValue (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:326:36
at [object Object]._.extend.withValue (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at Object.enterJob (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:317:26)
at buildCordova (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:769:16)
at Object.cordova.buildTargets (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:137:3)
at Command.doRunCommand [as func] (/home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands.js:324:15)
at /home/anupama/.meteor/packages/meteor-tool/.1.1.3.3alad3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/main.js:1363:23

anupama@ubuntu:/media/anupama/Data/MeteorProject/td$

Would anybody help please.

Thanks and Regards

Suresh