When I compile an android application ( I tried with the sample ones from the sdk). I get this error:
>Error executing aapt: Cannot run program "/home/roel/projects/sdk/build-tools/18.0.1/aapt": >error=2, No such file or directory: error=2, No such file or directory KeyChainDemo >line 1 Android ADT Problem
But aapt is at that location?
>[roel@archUSB 18.0.1]$ ls /home/roel/projects/sdk/build-tools/18.0.1/
>NOTICE.txt aidl dx libLLVM.so libbcinfo.so llvm-rs-cc source.properties
>**aapt** dexdump lib libbcc.so libclang.so renderscript
Note: I also get the error "R cannot be resolved", but I'm pretty sure that when I solve problem 1, I also solve this problem
Ubuntu 14.04.1 LTS solution:
sudo apt-get update
sudo apt-get install gcc-multilib lib32z1 lib32stdc++6
Reason: aapt needs 32-bit libraries installed
The problem was my 64bit OS , I missed some 32 bit libs ;)
SDK tools 24 has a bug, build will fail with the same error. Should be fixed in the new version, for now the workaround in tools/ant/build.xml place
<property name="aapt" location="${sdk.dir}/build-tools/22.0.1/aapt" />
<property name="aidl" location="${sdk.dir}/build-tools/22.0.1/aidl" />
<property name="dx" location="${sdk.dir}/build-tools/22.0.1/dx" />
<property name="zipalign" location="${sdk.dir}/build-tools/22.0.1/zipalign" />
at the end of the xml in the root tag. Replace 22.0.1 with your build tools version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With