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

耗尽温柔 提交于 2019-12-07 09:13:49

问题


i just upgraded my system to Ice Cream Sandwich (Android 4.0) and now everytime I attempt to run my application in the debugger, I get a crash in aapt.exe.

If I just build, it builds fine, but when I go to run it in the debugger, aapt.exe crashes (which pops up a dialog and asks me if I want to send data to Microsoft) and my project icon in Project_Explorer shows that it has error(s).


回答1:


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]




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/7913539/aapt-exe-is-throwing-unhandled-exception-while-building-apk-file-for-android-p

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