Ionic platform add android [UBUNTU 13.10]


I already placed the tools and platform-tools android sdk in the PATH and still got this error when I run ‘ionic add android platform’:

                     throw e; 
Error: An error occurred while listing targets Android 
     at /home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/lib/check_reqs.js:87:29 
     at _rejected (/home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:808:24) 
     at /home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:834:30 
     at Promise.when (/home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:1079:31) 
     at Promise.promise.promiseDispatch (/home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:752:41) 
     at /home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:574:44 
     at flush (/home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:108:17) 
     at process._tickCallback (node.js: 415: 13) 
Error: /home/bdouglas/.cordova/lib/android/cordova/3.5.1/bin/create: Command failed with exit code 8 
     at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23) 
     at ChildProcess.EventEmitter.emit (events.js: 98: 17) 
     at maybeClose (child_process.js: 743: 16) 
     at Process.ChildProcess._handle.onexit (child_process.js: 810: 5) 

I already have Apache Ant installed on my pc and also to run ‘ant -v’ in terminal I: Apache Ant ™ version 1.9.2 compiled on July 14 2013

Echo my PATH: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-7-oracle:/usr/share/ant:/home/bdouglas/adt/sdk:/home/bdouglas/adt/sdk/tools:/home/bdouglas/adt/sdk/platform-tools:

Have you followed all these steps: 52,746,225

And yet still the same error.

Can anyone help?


A common issue with Android and Ubuntu is that Ubuntu 64 bit won’t run the Android SDK out of the box. Old tutorials recommend installing ia32-libs, but on modern Ubuntu installs, that package doesn’t exist.

You should try running the following:

apt-get install -qq -y libc6:i386 libgcc1:i386 libstdc++6:i386 libz1:i386

Also check and make sure you have target 19 installed in your Android SDK.

I created an automated script to accomplish all this in Ubuntu here: