我正在运行带有 Jenkins 的无头 Ubuntu 服务器,用于 Android 构建,主要用于测试,几个物理设备一直连接。
一周前它开始表现得很奇怪,在这台机器上成功构建是不可能的。起初我认为它可能是代码,然后是 pom.xml 文件。
Maven 项目抛出相同的错误(132):
[INFO] Illegal instruction (core dumped)
[ERROR] Error when generating sources.
...
Caused by: com.jayway.maven.plugins.android.ExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c cd /var/lib/jenkins/sks/Wieliczka/app && /opt/android-sdk/build-tools/18.0.1/aapt package -m -J /var/lib/jenkins/sks/Wieliczka/app/target/generated-sources/r -M /var/lib/jenkins/sks/Wieliczka/app/AndroidManifest.xml -S /var/lib/jenkins/sks/Wieliczka/app/res -S /var/lib/jenkins/sks/Wieliczka/app/target/unpack/apklibs/com.actionbarsherlock_actionbarsherlock_apklib_4.4.0/res --auto-add-overlay -A /var/lib/jenkins/sks/Wieliczka/app/assets -I /opt/android-sdk/platforms/android-17/android.jar, Result = 132
我用“android create project”命令创建了新项目,然后我尝试用 Ant 构建它,结果同样的错误
[aapt] Generating resource IDs...
BUILD FAILED
/opt/android-sdk/tools/ant/build.xml:649: The following error occurred while executing this line:
/opt/android-sdk/tools/ant/build.xml:690: null returned: 132
机器运行在 32 位处理器上,它已经很老了,我相信大约 7 岁
Ubuntu版本:
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
爪哇版
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode)
Android SDK 是最新的,实际上我已经重新下载并重新安装了两次 :-/