当我尝试从 Eclipse 导出 Android 应用程序时,aapt.exe 崩溃
自从我两天前将 Android SDK 更新到版本 API 14 以来,我在 Windows 7 x64 笔记本电脑上使用 Eclipse Helios 时遇到了麻烦。
当我尝试导出项目时,一切正常,直到我按下“完成”按钮:然后出现一个弹出窗口,显示“aapt.exe 已停止工作”,并且我无法获得签名的 apk;该项目不会返回错误并照常编译。
我用谷歌搜索找到了一个解决方案,但我发现没有一个解决方案有效:
- 我清理了项目(项目>清理)
- 我禁用了自动构建(项目>自动构建)
- 我删除了所有导入的库(右键单击项目>属性>) Java 构建路径)
- 我更新了所有相关软件(帮助>检查更新)
- 我将 logcat 模式置于详细状态
- 我删除了 .9.png 可绘制对象并读入我的项目
这些是我的所有解决方案发现与aapt.exe相关的问题。您还有其他建议吗?
PS:我还遇到了所有 .9.png 文件显示不正确的布局问题,但我不知道它是否相关。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我在 Window>Preferences>Android>Build 中找到了一个解决方案,方法是在 Normal 上设置“Build output”,然后在 Project>Clean>Clean All 上设置。
我不知道这是否是最终的解决方案,但它使我能够使用正确的 .9.png 可绘制布局导出我的 apk。
希望有帮助。
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.
当我尝试将
id
添加为
时,我遇到了同样的问题 此处。当我删除它时,构建成功了。
I faced the same problem when I tried to add
id
as<resources>
as mentioned here.When I deleted this, the build was successful.
我在定义这样的菜单项时遇到了同样的问题:
我只是缺少图标文件 ic_menu_help,但它没有给我一个很好的消息,表明图像文件丢失,而是崩溃了。
I had this same problem defining a menu item like this:
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.