'aapt' error. Pre Compiler Build aborted

随声附和 提交于 2019-12-01 18:25:06

I'm getting the same error, and try using the older android build tools as @Onko suggest in the second comment solve the problem. The android build tool v19 won't report the error in your resource files.

So what I did was, re-download the Build-tools v18 in SDK Manager and delete the v19.0.1 then restart the eclipse and clean and force eclipse to rebuild the project. After that I found what is the error in my resource xml file.

I've been stuck at this nasty error at least few times and every time I lost hours to find the exact cause. One possible reason could be something malformed in a menu XML. In example ifRoom is misspelled.

<menu xmlns:android="http://schemas.android.com/apk/res/android" >    
    <item
        android:showAsAction="iFroom|withText" 
        ...
    />

</menu>    

It is not detected by the XML editor. Nor it is reported as an error. Aapt just crashes without error message. Also be cautious about other kind of misspell mistakes in the menu XML. It seems the menu XML verification tool is not fully complete.

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