why am I getting the error “error executing aapt ”

廉价感情. 提交于 2019-12-12 02:42:56

问题


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


回答1:


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"/>

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.

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.




回答2:


I got this error when I had deleted a @string entry that was being referenced in a menu node xml resource.




回答3:


I had this error and spent time trying to find a solution.

Finally the solution for this error which is: -1073741819 ( check the digits ) was a library was missing from: Properties -> Android -> Library I just added the missing libraries and got this error resolved.




回答4:


I got the same problem. What helped me was changing the Project Build Target

Properties->Android->Project Build Target



来源:https://stackoverflow.com/questions/20788721/why-am-i-getting-the-error-error-executing-aapt

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