aapt.exe is throwing unhandled exception while building *.apk file for Android project in Eclipse

一个人想着一个人 提交于 2019-12-05 17:18:21
Rajdeep Dua

There is a known issue in AAPT for r15, try to change the build output to normal
http://tools.android.com/knownissues
AAPT crashes on Windows in some cases when the build output is set to verbose.

The workaround is to set

Eclipse > Preferences > Android > Build > Build Output

to less than Verbose, e.g. Normal.We have a fix, which will be available in tools 16. [Issue 20395]

In my case this solution doesn't work (Build Output), so I had to think. The problem was with .9.png files (bitmaps with my spinner). I deleted it and aapt.exe works fine.

kmonsoor

I got same issue with ADT 16.0.1 (released: December 2011). Error occurred when executing C:\android-sdk\platform-tools\aapt.exe crunch -v -S C:\Do... and Windows shows an exception thrown from aapt.exe.

Then a 0-byte <myproject>.apk has been created. And Eclipse shows error ...resources.ap_ file not found....

BTW, i am using up-to-date (as of today) Eclipse, android-sdk and ADT.

But my problem was solved just by changing build output to normal as described in the above solution.

I am also suggesting to change the question title.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!