本文介绍了" aapt.exe"建立单声道的Andr​​oid项目时退出,code 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我把一个相当简单单的Andr​​oid应用程序,做无非发挥AndroidResourceMP3的后台服务(从<复制的href="http://visualstudiomagazine.com/Articles/2012/07/10/Background-Services-in-Mono-for-Android.aspx?Page=1">Greg镣铐在MFA 的后台服务最新的Visual Studio杂志的文章)。我把code一起,用我自己的自定义MP3文件,并试图建立它,只有拿到这个可爱的错误。

I put together a fairly simple Mono for Android application that does nothing more than play an "AndroidResource" MP3 in a background service (copied from Greg Shackles latest Visual Studio Magazine article on Background Services in MfA). I put the code together, with my own custom MP3 file, and tried to build it, only to get this lovely error.

"aapt.exe" exited with code 1

这是在错误列表中的唯一信息,并建立输出日志。

That is the only info in the error list and build output log.

推荐答案

如果你穿过这个错误运行,希望你也将跨越一个<一个运行href="http://mono-for-android.1047100.n5.nabble.com/Drawable-Resource-aapt-exe-exited-with-$c$c-1-td4952932.html">post由乔纳森·普赖尔的回答别人同样的问题。该建议是打开的MSBuild的更详细的日志记录,看看你得到一些有用的东西了这些消息。

Step 1: get more info

If you run across this error, hopefully, you will also run across a post from Jonathan Pryor replying to someone else with the same problem. The suggestion is to turn on more verbose logging from MSBuild to see if you get something useful out of those messages.

在Visual Studio的选项对话框,进入项目和解决方案,然后生成和运行。从最小到正常切换MSBuild项目生成输出的详细程度,并再次生成项目。这样做之后,我得到这个消息,这是更有益的。显然,资源不能包括任何东西,但字母,数字,句号和下划线( [A-Z0-9 _] )。

In the Visual Studio Options dialog, go to "Projects and Solutions" then "Build and Run". Switch the "MSBuild project build output verbosity" from "Minimal" to "Normal" and build your project again. After doing so, I got this message which was far more helpful. Apparently, resources cannot include anything but letters, numbers, periods, and underscores ([a-z0-9_.]).

重命名文件中所要求的限制,并重新建立。

Rename file within the required restrictions and build again.

虽然此错误信息可能会出现比文件名限制的问题远远更多的情况下,文件名改变完全修复了这个特殊的问题。

While this error message may come up for far more situations than filename restriction issues, a filename change fixed this particular issue completely.

这篇关于&QUOT; aapt.exe&QUOT;建立单声道的Andr​​oid项目时退出,code 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 05:24
查看更多