10

When I run my android project in Intellij IDEA using an AVD I get this error

android-apt-compiler: Cannot run program "/Users/myAccount/Documents/android-sdk-macosx/platform-tools/aapt": error=2, No such file or directory

Can anyone help? Thanks in advance!

wiiwilleat
  • 209
  • 2
  • 13
  • 1
    Same problem, occurs in IntelliJ Ultimate, 12.1.3 on Mac. There is a bug report http://youtrack.jetbrains.com/issue/IDEA-107311, vote please! – Alex May 20 '13 at 08:42
  • 1
    Check: [ADT 22 - missing aapt.exe after upgrading](http://stackoverflow.com/questions/16585099/adt-22-missing-aapt-exe-after-upgrading) – Paresh Mayani May 20 '13 at 11:42

4 Answers4

6

Yeah according to Simon in Android Hello-World compile error: Intellij cannot find aapt "It appears that the latest update to the r22 SDK release moved aapt and the lib jar from the platform-tools to the build-tools directory. While we wait for JetBrains to release an update, here's a quick fix using a couple of symbolic links for Unix users:

From your AndroidSDK/platform-tools directory, run the following:

ln -s ../build-tools/17.0.0/aapt aapt
ln -s ../build-tools/17.0.0/lib lib

...and IntelliJ should be able to compile as normal. "

Unfortunately copying is the easier way around this on windows... unless you use something like

mklink /H C:\Users\Tom\androidsdk\build-tools\17.0.0\aapt.exe C:\Users\Tom\androidsdk\platform-tools\aapt.exe

in the command prompt to attempt to make a hard link window's style of the file to your platform tools folder.

caveat I haven't tried this though...

Community
  • 1
  • 1
dawogfather
  • 604
  • 5
  • 10
4

I solve this problem on WIn by copy all files from android-sdk/build-tools/17.0.0 to platform-tools folder.

Stepango
  • 4,721
  • 3
  • 31
  • 44
3

i was successfully resolving on mac 10.8

copied only aapt and lib\dx.jar and dx

from build-tools/18.0.1 to platform-tools

0

i copied only aapt.exe and lib\dx.jar

from build-tools\android-4.2.2

to

platform-tools

radistao
  • 14,889
  • 11
  • 66
  • 92