扩展我以前的问题Aapt is not working correctly - cannot generate R IDs on fresh project

我在32位计算机上安装了全新的Ubuntu Server 12.04,此后,我下载了Android SDK并进行了升级。然后我从命令行创建了新项目:

gyver@Gyver:~/tmp$ android create project
    -t android-17 -p test -k com.example.test -a HomeActivity


此时没有问题。然后,我尝试使用Ant进行编译:

gyver@Gyver:~/tmp/test$ ant clean debug install
Buildfile: /home/gyver/tmp/test/build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 22.0.5
 [checkenv] Installed at /opt/android-sdk

-setup:
     [echo] Project Name: HomeActivity
  [gettype] Project Type: Application

-pre-clean:

clean:
   [delete] Deleting directory /home/gyver/tmp/test/bin
[getlibpath] Library dependencies:
[getlibpath] No Libraries
   [subant] No sub-builds to iterate on

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 22.0.5
 [checkenv] Installed at /opt/android-sdk

-setup:
     [echo] Project Name: HomeActivity
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 18.0.1
     [echo] Resolving Build Target for HomeActivity...
[gettarget] Project Target:   Android 4.2.2
[gettarget] API level:        17
[gettarget] WARNING: No minSdkVersion value set. Application will install on all Android versions.
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/gyver/tmp/test/bin
    [mkdir] Created dir: /home/gyver/tmp/test/bin/res
    [mkdir] Created dir: /home/gyver/tmp/test/gen
    [mkdir] Created dir: /home/gyver/tmp/test/bin/classes
    [mkdir] Created dir: /home/gyver/tmp/test/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for HomeActivity...
[dependency] Ordered libraries:
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
     [echo] ----------
     [echo] Handling Resources...
     [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

Total time: 3 seconds
gyver@Gyver:~/tmp/test$


一个错误,目前尚不清楚出什么问题。我查看了build.xml,发现Ant正在调用aapt,所以我尝试直接启动它

/opt/android-sdk/build-tools/18.0.1/aapt package -f -m
-M /home/gyver/tmp/test/bin/AndroidManifest.xml
-S /home/gyver/tmp/test/bin/res
-S /home/gyver/tmp/test/res
-I /opt/android-sdk/platforms/android-17/android.jar
-J /home/gyver/tmp/test/gen --generate-dependencies
-G /home/gyver/tmp/test/bin/proguard.txt


结果

Illegal instruction (core dumped)


有没有办法解决?在64位计算机上,Aapt看起来不错,这是我无法构建项目的唯一情况,是32位服务器

最佳答案

我的转速也有同样的问题。 18.0.1 apt。我认为这是一个错误,并在http://code.google.com/p/android/issues/detail?id=58663下打开了一个错误报告

转速17 aapt对我有用,因此使用rev可能是临时解决方案。 17个构建工具。

10-08 18:12