aapt.exe crashes when I try to export my Android application from Eclipse

两盒软妹~` 提交于 2019-11-27 12:27:33

问题


Since I updated two days ago my Android SDK to version API 14 I'm getting troubles using Eclipse Helios on my Windows 7 x64 laptop.

When I try to export a project everything is ok until I get to press the "finish" button: then a popup appears saying "aapt.exe has stopped working" and I can't get my signed apk; the project doesn't return errors and compiles as usual.

I googled to find a solution but nothing of the solutions i found worked:

  • I cleaned the project (Project>Clean)
  • I disabled the automatic build (Project>Build Automatically)
  • I deleted all the imported libraries (Right click on the project>Properties>Java Build Path)
  • I updated all the related software (Help>Check for updates)
  • I put logcat mode on verbose
  • I deleted my .9.png drawables and readded to my project

These are all the solutions I found related to aapt.exe issues. Do you have any other suggestion?

PS: I'm also getting a layout issue with all my .9.png files that are not displayed correctly, but I don't know if it's related.


回答1:


I found a solution in Window>Preferences>Android>Build by setting "Build output" on Normal and then Project>Clean>Clean All.

I don't know if this is the definitive solution but it made me able to export my apk with the proper .9.png drawable layout.

Hope it helps.




回答2:


I faced the same problem when I tried to add id as <resources> as mentioned here.

<resources>
  <item type="id" name="button_ok" />
  <item type="id" name="dialog_exit" />
</resources>

When I deleted this, the build was successful.




回答3:


I had this same problem defining a menu item like this:

<item 
    android:id="@+id/menu_help" 
    android:showAsAction="never|withText"
    android:title="@string/action_label_help"
    android:icon="@drawable/ic_menu_help"
/>

I was just missing the icon file ic_menu_help, but instead of giving me a nice message that the image file was missing, it crashes aapt.



来源:https://stackoverflow.com/questions/7843436/aapt-exe-crashes-when-i-try-to-export-my-android-application-from-eclipse

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