Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio cannot find aapt

Hi I am having trouble compiling, I get this error:

Gradle: Execution failed for task ':ElectronicComponentInventorySearch:mergeDebugResources'.

java.io.IOException: Cannot run program "/opt/android-studio/sdk/build-tools/android- 4.2.2/aapt": error=2, No such file or directory

When I use locate: /opt/android-studio/sdk/build-tools/android-4.2.2/aapt

Before I tried anything I made sure to chown the whole android-studio directory to my account and set permissions for everything to 775.

Whats up?

like image 532
omegacore Avatar asked Sep 21 '13 02:09

omegacore


People also ask

Where is AAPT located?

Where it is. In the SDK, aapt is found in the $ANDROID_HOME/platforms/$SDK/tools/ directory of the SDK (where $SDK is the name of some Android version, like android-2.1).

Where is AAPT located Android SDK?

aapt stands for Android Asset Packaging Tool and is included in the tools/ directory of the SDK. This tool allows you to view, create, and update Zip-compatible archives (zip, jar, apk). It can also compile resources into binary assets.

What is AAPT EXE?

aapt.exe is the Android Asset Packaging Tool (aapt). It's designed to take your application resource files, such as the AndroidManifest. xml file and other XML files used for every "Activity" in your Android app, and compile them.

Why is AAPT needed?

AAPT allows you to view, create, and update ZIP-compatible archives (ZIP, JAR, and APK). It can also compile resources into binary assets. It is the base builder for Android applications.


2 Answers

Aapt is a 32bit application. I am running ubuntu 64bit. I needed some additional libraries. First thing I did was update to 13.04 from 12.10. It broke chrome but this should help.

To get aapt working (this fixed my issues with the avd as well) just run these two commands:

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

From this post.

Now no more problems.

like image 196
omegacore Avatar answered Sep 19 '22 16:09

omegacore


You can try this :-

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

like image 26
Curious_Tom Avatar answered Sep 21 '22 16:09

Curious_Tom