Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Running Android Project in Intellij IDEA

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!

like image 576
wiiwilleat Avatar asked May 18 '13 22:05

wiiwilleat


People also ask

Can I run Android app in IntelliJ?

IntelliJ IDEA is one of the popular IDE that is used for developing android applications.

Can I open Android Studio project in IntelliJ?

Create a new Android project Launch IntelliJ IDEA. On the Welcome screen, click New Project. If you already have a project open, from the main menu select File | New | Project. In the New Project wizard, select Android on the left.

How configure Android SDK IntelliJ?

Set up a module SDKFrom the main menu, select File | Project Structure | Project Settings | Modules. Select the module for which you want to set an SDK and click Dependencies. If the necessary SDK is already defined in IntelliJ IDEA, select it from the Module SDK list.


2 Answers

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...

like image 165
dawogfather Avatar answered Sep 28 '22 07:09

dawogfather


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

like image 35
Stepango Avatar answered Sep 28 '22 06:09

Stepango