1
votes

I got following error when I trying to build the cordova android project, My platform is ubuntu 14.04

command : cordova build

BUILD FAILED /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/tools/ant/build.xml:601: The following error occurred while executing this line: /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/tools/ant/build.xml:653: The following error occurred while executing this line: /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/tools/ant/build.xml:698: Execute failed: java.io.IOException: Cannot run program "/home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/aapt" (in directory "/home/gayan/hello/platforms/android/CordovaLib"): error=13, Permission denied

/home/gayan/Softwares/adt-bundle-linux-x86_64-20140321 is the location for android sdk

/home/gayan/hello/ is the cordova project path

can someone give me a help

2
Check the permissions on the folder indicated in your error message (/home/gayan/hello/platforms/android/CordovaLib)Kerri Shotts

2 Answers

1
votes

This is because you are missing some libraries! The links below will help you download the right ones.

This answer fixed it for me.

This related question might help

You could always try building it as a bowser app first to check that at least something works. Then move onto the android portion. Good Luck!

0
votes

The problem is that the application 'aapt' does not have the execute permissions on it. This can be seen by opening a terminal and:

cd /home/gayan/Softwares/adt-bundle-linux-x86_64-20140321/sdk/build-tools/android-4.4.2/
ls -l

The output should have a line similar to:

-rw-------. 1 <username> <group>  1119502 Sep 13  2013 aapt

(Your actual owner and group names will appear instead of the and placeholders I've used above)

You can run the following command to add the necessary execute permissions to the file (be warned though that this will give everyone execute rights on the file), assuming that you have the necessary permissions to modify the file rights:

chmod +x aapt

That should allow the build to continue.