安卓你好,世界编译错误:的IntelliJ找不到AAPT [英] Android Hello-World compile error: Intellij cannot find aapt
问题描述
我试图让设置与在Ubuntu 12.04使用的IntelliJ一个Android开发环境。我创建了一个Android应用模块,但是当我试图构建,我得到以下错误:
I'm trying to get set up with an Android development environment using IntelliJ in Ubuntu 12.04. I create an Android Application Module, but when I try to build, I get the following error:
Android的容易编译:不能运行程序/家/乔恩/程序/ Android的SDK-Linux的/平台工具/ AAPT:java.io.IOException异常:错误= 2,没有这样的文件或目录
android-apt-compiler: Cannot run program "/home/jon/Programs/android-sdk-linux/platform-tools/aapt": java.io.IOException: error=2, No such file or directory
几个小时冲刷互联网的并没有帮助。
Several hours of scouring the internet hasn't helped.
顺便说一句,我跑定位终端AAPT
,发现 AAPT
位于 /home/jon/Programs/android-sdk-linux/build-tools/17.0.0/aapt
By the way, I ran locate aapt
in the terminal and found that aapt
is located at /home/jon/Programs/android-sdk-linux/build-tools/17.0.0/aapt
推荐答案
看来,最新的更新到R22 SDK发布移动AAPT,并从平台工具来构建-tools目录中的lib罐子。在我们等待JetBrains公司发布的更新,这是一个使用几个符号链接速战速决:
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:
这是你的AndroidSDK /平台工具目录下,运行以下命令:
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
...和IntelliJ应该能够编译为正常。
...and IntelliJ should be able to compile as normal.
这篇关于安卓你好,世界编译错误:的IntelliJ找不到AAPT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!