“适合"IOException 错误=2,没有这样的文件或目录"为什么我不能在 jenkins 上构建我的 gradle?
我有一个小问题.
问题:
我正在尝试在 Jenkins 上构建我的 Android 项目的 gradle,现在我站在这个我无法解决的问题上.在构建过程中,我收到此错误消息:
The Problem:
I am trying to build a gradle of my Android Project on Jenkins and now I am standing on this problem i can't resolve.
During the Building I have this Error message:
: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...它也在那里,所以错误一定在其他地方.
You can imagine that this aapt... yep its there and the png... its there too, so the mistake must be somewhere else.
解决方案?
现在我在谷歌上搜索了 1-2 个小时,在这个很棒的网站上冲浪,我发现如果 Jenkins 在 64 位系统上运行,我需要安装 ia32-libs.像这样:
The Solution?
Now I googled 1-2 hours around, surfed on this great Website and what I found is that if Jenkins runs on a 64-bit system, I need to install the ia32-libs. Like that:
sudo apt-get install ia32-libs
现在我试过了,但无法安装:
now I tried that, and I couldn't install it:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch
所以我尝试安装 "ia32-libs-multiarch",但再次:
so I tried to install "ia32-libs-multiarch", but again:
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.
终于
所以最后我站在这里问我:这真的是解决方案吗?我为什么要安装这个东西?如何?所以请帮助我,我想我离答案不远了.
Finally
so finally im standing here and asking me: is that really the solution? And why should I install this thing? And how? So please help me, I think I am not far away from the answer.
我在 Ubuntu 13.10 上遇到了以下类似的错误:
I had the following similar error on Ubuntu 13.10:
无法运行程序/usr/local/android-sdk-linux/build-tools/19.0.3/aapt":error=2,没有那个文件或目录
并且这个答案为我修复了它:
要让 aapt 工作(这也解决了我的 avd 问题),只需安装这两个包:
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