Narzew
Narzew

Reputation: 33

Gradle build - aapt doesn't exist

I have problem when building with gradle. It says that aapt doesn't exist, but aapt exists and have chmod 0777. Code is ok, building with Ant works.

I give output: :mergeDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mergeDebugResources'.
> /home/nikodem/Workshop/PlanLekcji/res/drawable-mdpi/pt.png: Error: Cannot run program "/home/nikodem/Programy/AndroidSDK/build-tools/21.1.2/aapt": error=2, No such file or directory

/home/nikodem/Workshop/PlanLekcji/res/drawable-mdpi/pt.png is valid path to picture. /home/nikodem/Programy/AndroidSDK/build-tools/21.1.2/aapt is valid path to aapt.

Upvotes: 2

Views: 1951

Answers (3)

caro
caro

Reputation: 31

I met this issue, so google for two hours, tried "install lib32stdc++6", but still not work, finnally, I just go to /AndroidSDK/build-tools/21.1.2/aapt, in the terminal, I use ./aapt , it popped errors like "./aapt: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory", I google and install this package and continue use ./aapt, it popped missing other packages, after install several, it finnally worked ,I think it is the final way to solve it. hope it helped

Upvotes: 0

Jakub Turcovsky
Jakub Turcovsky

Reputation: 2126

Just install these two packages for aapt and it'll be alright ;)

(Write these commands in your terminal window)

sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1

Upvotes: 6

Craiten
Craiten

Reputation: 109

I had the same problem. I solved it with

chmod +x /Android/Sdk/build-tools/21.1.2/aapt

After this my project built without errors.

Upvotes: 0

Related Questions