Eclipse and Android SDK issue “aapt.exe has stopped”

我只是一个虾纸丫 提交于 2019-12-01 03:04:31

Remove id from style like here @+id then build again you get success...

<item name="android:id">@+id/calender</item>

it seems you were missing some entries in strings.xml

in my case I was deleting <string name="action_settings">Settings</string>

thinking it was not used by the project and placing it back solved the issue. You can search for same or similar type of tag in you project.

This can also happen if you have an incorrect option in an item. Example:

<item
    android:id="@+id/menu_dashboard_add_group"
    android:icon="@android:drawable/btn_plus"
    android:title="Add group"
    android:showAsAction="true">

Note the true that is invalid for android:showAsAction

Happens when you don't put @+id/ in menus/layout xml files.

Apparently it seems that the only thing that worked for me was writing back the resourse <string name="action_settings">Settings</string> after which the problem appeared. Actually I erased it in the first place because it was not used througout my open project...

For me, this happened when I included a ” or ' character. I'd replaced the apostrophe with &apos;, but aapt still wanted the prefixing backslash.

worawee.s

Not sure but please try to use the Android SDK Build-Tools v18.1.1 instead of 19.0.1

It might be the case that you have error in your resource files, the v19 build-tools won't report the error but keep failing to compile the R.

Please read more detail in the 2nd comment of the question below. I also wrote the some steps I went through in the first reply. hope this will help solving your problem.

'aapt' error. Pre Compiler Build aborted

Donot forget + sign for id attributes in menu.xml files

<item android:id="@id/action_download_time"

vs

<item android:id="@+id/action_download_time"

Check if you have any string values with html codes such as non-breaking-space (&nbsp;) Remove them and clean the project. It should work.

Ram

For me it happend after creating a new activity by

your_package-Right-Click-> Create a new-> "Android Activity"->Fill fields->"Done"

I solved it by reverting to previous version of my app

It also happend for me IF ASSETS FOLDER exist any file without resolution

for examle: if ASSETS FOLDER exist any file

file:///android_asset/html/qwwww

[result] BUG! “aapt.exe has stopped”

To solve it all files should have a resolution

file:///android_asset/html/qwwww.css

For me it was the buildToolsVersion '21.0.0' the old one buildToolsVersion '20.0.0' works for me but the newer one crashes the aapt.exe.

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