3

我正在运行 Ubuntu 12.04 LTS 并在构建示例 Android Studio 示例时收到以下错误:

Gradle:任务“:MyApplication:mergeDebugResources”执行失败。

错误:无法运行命令:/home/dean/android-studio/sdk/build-tools/android-4.3.1/aapt s -i /home/dean/AndroidStudioProjects/MyApplicationProject/MyApplication/build/exploded-bundles/ComAndroidSupportAppcompatV71800 .aar/res/drawable-xhdpi/abc_ic_search.png -o /home/dean/AndroidStudioProjects/MyApplicationProject/MyApplication/build/res/all/debug/drawable-xhdpi/abc_ic_search.png 错误代码:132 它看起来像我缺少一些资源。

4

1 回答 1

0

There seems to be an issue with aapt on some 32 bit systems. It throws an error 132 on app:processDebugResources which is when aapt is 'crunching' png files ready for inclusion in the apk package. You can see more details at https://code.google.com/p/android/issues/detail?id=75110

This agrees with your reported error - "aapt -s" is the command to crunch a single image file (in your case abc_ic_search.png).

Some people have reported that 'fixing' the offending png files (e.g. by opening in Gimp and saving) sorts the problem so that would be worth trying at least. There's clearly a deeper problem with aapt but that may get you going for now.

Also can you just say if you are indeed running on a 32 bit processor, and if so which one? You can use lscpu to find out.

于 2015-04-13T10:40:27.093 回答