为什么我收到错误"错误执行AAPT" [英] why am I getting the error "error executing aapt "

查看:256
本文介绍了为什么我收到错误"错误执行AAPT"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到执行AAPT错误:返回code 1073741819由于这
.apk文件不产生如何解决这个问题。如何解决,如果r.java文件丢失

I'm getting the error executing aapt :return code 1073741819 due to which .apk file is not generated how to fix this. How to fix if r.java file is missing

推荐答案

这可能是在XML文件中的一个语法或格式错误。我刚刚得到这个错误code(它实际上是负的),我检查了所有的 @string 引用和他们确定。最后,我想通了,这是因为在一个菜单的XML文件对该项目的:

It could be a syntax or formatting error in one of the XML files. I just got this error code (it's actually negative), and I checked all the @string references and they were OK. Eventually I figured out it was because of this item in a menu XML file:

<item
    android:id="@+id/action_stop"
    android:orderInCategory="100"
    android:icon="@drawable/ic_action_stop"
    android:showAsAction="ifRoom | withText"
    android:title="@string/action_stop"/>

然而,围绕的空间| 显然是无效的(XML是不是Java ...)。 Eclipse中没有赶上它是错的,但 AAPT 坠毁没有给当它看到它的原因。不是特别优雅的处理能力,通过Eclipse和 AAPT 。删除使一切工作的多余的空格。

However, the spaces around the | apparently aren't valid (XML isn't Java...). Eclipse didn't catch it as an error, but aapt crashed without giving a reason when it saw it. Not particularly graceful handling, by both Eclipse and aapt. Removing the extra spaces made everything work.

的strings.xml 缺少项问题显然会产生错误code -1073741816 ,而不是 -1073741819 。你要仔细看,但最后一个数字是不同的。

The problem with missing entries in strings.xml apparently produces error code -1073741816, not -1073741819. You have to look closely, but the last digit is different.

我并不是说这个问题肯定是某种语法错误。但它可能被调查的另一种可能性。

I'm not saying the problem is definitely some sort of syntax error. But it's another possibility that could be investigated.

这篇关于为什么我收到错误&QUOT;错误执行AAPT&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆