Last active
August 29, 2015 14:02
-
-
Save smaboshe/62380d4d48a32f57106f to your computer and use it in GitHub Desktop.
Problem adding the Android platform to a Cordova project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cordova platform add android | |
Creating android project... | |
/home/maximo/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:126 | |
throw e; | |
^ | |
Error: An error occurred while listing Android targets | |
at /home/maximo/.cordova/lib/android/cordova/3.5.0/bin/lib/check_reqs.js:87:29 | |
at _rejected (/home/maximo/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:808:24) | |
at /home/maximo/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:834:30 | |
at Promise.when (/home/maximo/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:1079:31) | |
at Promise.promise.promiseDispatch (/home/maximo/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:752:41) | |
at /home/maximo/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:574:44 | |
at flush (/home/maximo/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:108:17) | |
at process._tickCallback (node.js:419:13) | |
Error: /home/maximo/.cordova/lib/android/cordova/3.5.0/bin/create: Command failed with exit code 8 | |
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23) | |
at ChildProcess.EventEmitter.emit (events.js:98:17) | |
at maybeClose (child_process.js:753:16) | |
at Process.ChildProcess._handle.onexit (child_process.js:820:5) | |
$ ~/.cordova/lib/android/cordova/3.5.0/bin/check_reqs | |
[Error: An error occurred while listing Android targets] |
Try this. It is written step by step in details. It helped me. Hope it will help you guys as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I still get the error, despite setting this:
For full info, see this: http://stackoverflow.com/questions/26783594/phonegap-cordova-build-android-node-modules-q-q-js-throw-e
export ANDROID_HOME="/Users/rover/Documents/Dev/adt-bundle-mac-x86_64-20140702/sdk/"
export ANDROID_PLATFORM_TOOLS="$ANDROID_HOME/platform-tools/"
export PATH="$ANDROID_HOME/build-tools/21.0.2":"$ANDROID_HOME/platform-tools/":"$ANROID_HOME/tools":"$cdba/headers":$PATH
export ANT_HOME="/usr/local/bin/ant"
$ which android
/Users/rover/Documents/Dev/Android/adt-bundle-mac-x86_64-20140702/sdk/tools/android
$which ant
/usr/local/bin/ant
ant --execdebug
exec ".../jdk1.8.0_05.jdk/..."
I'm on OSX 10.10.
Is Ant Java 1.8 ok?
Any other ideas?