'aapt' error. Pre Compiler Build aborted

后端 未结 2 1763
日久生厌
日久生厌 2021-01-19 00:50

I\'m using Eclipse 4.2.2 with Android SDK 22.0.1 to construct an Android application which uses the Facebook and Google Play Services lib. However I\'m stuck with a proble

相关标签:
2条回答
  • 2021-01-19 01:04

    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.

    0 讨论(0)
  • 2021-01-19 01:18

    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.

    0 讨论(0)
提交回复
热议问题