6 June 2013

how to solve android-apt-compiler: Cannot run program " \Android\android-sdk\platform-tools\aapt.exe": CreateProcess error=2, The system cannot find the file specified problem ?

INFORMATION and SOLUTION for people who suffer from compiler do not run after   update Android SDK tools to  22.0.1

Solution for  Intellij IDEA 12.1 after update Android SDK tools to  22.0.1

STORY:

After I updated Android SDK tools to  22.0.1 . My Intellij IDEA IDE refuses to work with error:
android-apt-compiler: Cannot run program "C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe": CreateProcess error=2, The system cannot find the file specified

Firstly ,I  panicked ,then i read with understanding error message... and then i quick look into android folder and I discover that Android folks changes path where some stuff are and for example aapt.exe is in build-tools\17.0.0\ not platform-tools as was before.

WHAT HAPPEN:
Since  Android SDK tools  22.0.x ,there was path changes for bulid tool.Now,each build tools has own folder  under build-tools folder.I assumed it has to do with possible allowance to have a multiple build tool versions for whatever* reasons.

TEMPORARY SOLUTION

While you waiting  new release of IntelliJ IDEA (or your IDE) ... you need copy 1 folder(lab with dx.jar) and 1 file( aapt.exe)

from: (instalation path)\Android\android-sdk\build-tools\17.0.0\ to
to: (installation path)\Android\android-sdk\platform-tools
and
from: (instalation path)\Android\android-sdk\build-tools\17.0.0\aapt.exe
to: (instalation path)\Android\android-sdk\platform-tools\aapt.exe

if in windows your default path is C:\Program Files (x86),then

from: C:\Program Files (x86)\Android\android-sdk\build-tools\17.0.0\lib\
to:  C:\Program Files (x86)\Android\android-sdk\platform-tools

from: C:\Program Files (x86)\Android\android-sdk\build-tools\17.0.0\aapt.exe
to: C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe

after that everything will works again :)...

UPDATE(11.6'2013): Problem is solved in Intellij IDEA 12.1.4 (they have done 70 various fixes)

* I am sure that Android folks has official explanation for that ,but I didn't find it (by i didn't i mean too lazy to find)  .

3 comments:

  1. thank's a lot, you'r a life saver

    ReplyDelete
  2. thank you it's really helpful to me cuz today i upgraded from version 21.1 to 22 and 22.0.1

    ReplyDelete
  3. Thank you for documenting this. Saved me a lot of time.

    ReplyDelete