aapt.exe has stopped working in eclipse 4.3 kepler SDK 22.3 API level 19

自古美人都是妖i 提交于 2019-11-30 12:21:23

Also there is can be problem with incorrect menu option

<item
    android:id="@+id/action_grid"
    android:icon="@drawable/ic_grid"
    android:title="Grid"
    android:showAsAction="true">

in my case an icon in drawable was absent. Eclipse doesn't notify about this. Check carefully this moment!

user3092587

In eclipse, I do this to solve it:

  1. Windows > Preferences > Android > Build > Build Ouput > Select "Verbose"

  2. Select Project > Clean > OK

  3. Select Project > Build All

  4. Select "Console" output.

You may have to flip from DDBMS to Android here, mine flips back and forth. In the Android Console you will see the exact XML discrepancy causing the problem.

For me, it seems to be a problem with Android SDK Build Tools 19 so I downgraded to an older version, 18.1.1 in my case.

In my case the problem was due to missing xmlns attributes for namespace prefixes used in a manually created menu file. In my case these prefixes were app:, tools: and context:. I used NetBeans Check XML feature to find and fix the syntax issues in my Android XML files. Here is how:

  1. Open XML file in NetBeans: File => Open File
  2. Use right-click in editor window for XML file and choose "Check XML"
  3. Fix errors reported
  4. Repeat "Check XML" and fix error until no more errors

I have too long time search for a reason... Reason of this error was: menu.xml Just I've added new Activity for a test, and then I've remove this activity with layout xml, but menu was stayed in project... and 2 hours to search solution

i found out that i had put a menu item like this :

 <item
    android:id="@+id/share_fb"
    android:icon="@drawable/ic_menu_moreoverflow"
    android:showAsAction="never"
    android:title="@string/fb invitation menu title"/>

there were spaces here :

    android:title="@string/fb invitation menu title"/>

when i removed the spaces and put the correct strings.xml value, every thing went ok, and the aapt.exe error was gone

imthius

I had put capital S in in string tag in string resource file.
After replacing it with small letter aapt error was gone.

Clean all your projects first and then,

Eclipse > Preferences > Android > Build > Build Output > normal

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