我有一个小问题。
问题:
我正在尝试在 Jenkins 上构建我的 Android 项目的 gradle,现在我正面临这个我无法解决的问题。
在构建期间,我收到此错误消息:
:Client:mergeDebugResources
/var/lib/jenkins/workspace/LMA-Client/Client/build/exploded-aar/com.google.android.gms/play-services/3.1.59/res/drawable-hdpi/common_signin_btn_text_focus_light.9.png:
Error: Cannot run program "/opt/android-sdk/build-tools/19.0.1/aapt": java.io.IOException: error=2, No such file or directory
:Client:mergeDebugResources FAILED
你可以想象这个 aapt...是的,它在那里,而 png...它也在那里,所以错误一定是在其他地方。
解决方案?
现在我用谷歌搜索了 1-2 个小时,浏览了这个很棒的网站,我发现如果 Jenkins 在 64 位系统上运行,我需要安装 ia32-libs。像这样:
sudo apt-get install ia32-libs
现在我试过了,但我无法安装它:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch
所以我尝试安装“ia32-libs-multiarch”,但又一次:
The following packages have unmet dependencies:
ia32-libs-multiarch:i386 : Depends: libgphoto2-2:i386 but it is not going to be installed
Depends: libsane:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
终于
所以最后我站在这里问我:这真的是解决方案吗?我为什么要安装这个东西?如何?所以请帮助我,我想我离答案不远了。
最佳答案
我在 Ubuntu 13.10 上遇到了以下类似错误:
无法运行程序“/usr/local/android-sdk-linux/build-tools/19.0.3/aapt”: error=2, No such file or directory
还有 this answer为我修好了:
To get aapt working (this fixed my issues with the avd as well) just install these two packages:
sudo apt-get install lib32stdc++6 lib32z1
关于java - "aapt"IOException 错误=2,没有这样的文件或目录 "why can' t 我在 Jenkins 上构建我的 gradle?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22701405/