35

I just updated ADT, than the SDK and now I have in only one project the issue, that my aapt isn't found

Error executing aapt. Please check aapt is present at /opt/android/platform-tools/aapt

The path is correct, I checked twice and more times.

-rwxrwxrwx 1 martin martin 3,5M 2010-12-08 10:41 /opt/android/platform-tools/aapt

I can start aapt via console, the permissions are 777, I restarted eclipse, closed/reopened the project, restarted adb and finally my Ubuntu.

Some ideas why this might happen only at one project?

WarrenFaith
  • 56,228
  • 24
  • 130
  • 145
  • Possible duplicate of [Android SDK on a 64-bit linux machine](http://stackoverflow.com/questions/2710499/android-sdk-on-a-64-bit-linux-machine) – jk2K Aug 31 '16 at 02:14
  • @jk2K no it is not but thanks for waking up a 6 year old question. It was a caching issue (you would have seen it if you would have read the answer) – WarrenFaith Aug 31 '16 at 07:30

14 Answers14

32

It seems that cleaning this specific project doesn't work but cleaning all open project does the trick.

I leave this question if someone else get this issue.

WarrenFaith
  • 56,228
  • 24
  • 130
  • 145
  • Very strange, but that did it for me too. Seems google needs to do some work on the plugin. – arinte Dec 12 '10 at 05:03
  • Worked perfectly! Thanks! Seems like there have been more issues since the update to the latest SDK. – Computerish Jan 08 '11 at 04:10
  • 1
    Odd, exact same Behavior for me. Updated to 8.0.1 ( win x64 ) and got aapt error, did a eclipse -clean and nothing, but doing a project->clean... fixed it. Thanks! Don't think I would have found this one without your suggestion. – Serapth Jan 17 '11 at 15:51
  • Same issue on Mac Snow Leopard, clean of all projects did the trick. – hoserdude Apr 22 '11 at 21:16
17

I found that this could be fixed by installing the ia32-libs package as the Android sdk requires 32-bit libraries.

HorusKol
  • 7,422
  • 10
  • 44
  • 85
  • 1
    Wouldn't have guessed that using 64bit was the problem if I hadn't seen your comment. Thanks. – aiham Sep 06 '11 at 09:45
  • Thank you. I had to install the ia32-libs and then run a clean on the project. – Matt Dec 21 '11 at 18:54
13

I solved this problem by adding a / after my android-sdk path in...

Eclipse->preferences->android->SDK Location:

Justin Graham
  • 131
  • 1
  • 2
10

The aapt location has been changed recently. You can find it under:

/path/to/adt/sdk/buid-tools/android-[version]/aapt

RafalManka
  • 308
  • 5
  • 12
4

In the terminal execute this command :

chmod a+x platform-tools/aapt

it solved the problem for me

(in 64bit you have to install ia32-libs with this command : sudo apt-get install ia32-libs)

3
  • Check you have Android SDK version required installed and the path in Eclipse->preferences->android->SDK Location is correct.
  • Check file permissions. Run:

    chmod a+x aapt
    
  • If you are using Linux 64-bits. You'll see this hint:

    Hint: On 64-bit systems, make sure the 32-bit libraries are installed: sudo apt-get install ia32-libs        line 1  Android ADT Problem
    

    To fix it, you'll have to install 32-bits libraries:

    sudo apt-get install ia32-libs
    

    or

    sudo apt-get install lib32z1
    

    Maybe you'll need to install other libraries (libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386) or the emulator (libsdl1.2debian:i386). In my case it was enough installing libstdc++6

    sudo apt-get install lib32stdc++6
    

For more information you can check this question: How to resolve Error executing aapt in Android/Eclipse?

Vladimir Ivanov
  • 41,277
  • 17
  • 74
  • 99
Miguelos
  • 121
  • 1
  • 2
  • 14
3

Starting build-tool 23, aapt has been moved under the ./bin directory

waiting for Eclipse ADT to be updated , one can just create a symbolic link to aapt

cd <path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1
ln -s ./bin/aapt aapt

this will create a symlinc

<path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1/aapt

pointing to actual aapt tool laying here

<path_to_your_android_sdk_folder>/build-tools/23.0.0_rc1/bin/aapt

and eclipse will be able to build android project back again :-)

Pascal
  • 10,269
  • 2
  • 44
  • 62
2

My issue with aapt got solved by simply chmod a+x platform-tools/aapt

neofreko
  • 138
  • 4
  • 8
0

I have faced the same problem after updating the SDK. I find out that the AUTOGENERATE folder doesn't have any file. What I done is :

WINDOWS->ANDROID SDK MANAGER:

  1. rollback the SDK version to 16
  2. Install all the tool provided.
    • SDK TOOLS (Version 16)
    • Platform Tools
  3. install the SDK 4.0
  4. Restart the eclipse

It solved!

Sabre
  • 3,911
  • 5
  • 31
  • 53
0

Following did the trick for me. Had to do the build dep as some of the lib dependencies were missing.

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

Restart eclipse

Venkat Kotra
  • 9,226
  • 3
  • 39
  • 47
0

For me, the problem was that Eclipse 4.4 was looking for aapt without "bin/" at the end of the path.

Since I could not find a way to configure this path, I symlinked the aap executable from the "bin" subdirectory to the "23.0.0_rc1" directory one level higher. This works now.

ScyDev
  • 671
  • 6
  • 11
0

I didn't collide with this problem, but if you have ADT 8 revision or later, so you should read it's dependencies better: "ADT 8.0.0 is designed for use with SDK Tools r8. If you haven't already installed SDK Tools r8 into your SDK, use the Android SDK and AVD Manager to do so." (http://developer.android.com/sdk/eclipse-adt.html)

WarrenFaith
  • 56,228
  • 24
  • 130
  • 145
teoREtik
  • 7,684
  • 13
  • 43
  • 65
0

I've run into this problem constantly and can not get R to be resolved to a variable after making projects clean, in addition to not being able to find aapt - Error executing aapt. Please check aapt is present at C:\AndroidSDK\android-sdk-windows\platform-tools\aapt.exe

None of the suggestions on this page make any sense or have helped in anyway. I'm using nothing but API 8 onwards.

mrhassell
  • 125
  • 2
  • Resolve this by opening the Android SDK and AVD manager. Have a look if anything has a broken link icon in the installed package list and regardless, to clear the errors, update all and check under available packages for everything from the Android repository and take all the google third party add-ons. – mrhassell Jun 17 '11 at 23:47
0

I solved this problem by checking 'build automatically' under project menu.

Milad Khajavi
  • 2,586
  • 8
  • 36
  • 64