Friday, December 20, 2013

Android Compilation Error: aapt.exe has stopped working

An Android project references a third-party library. Everything worked fine untill the third-party library updated to a new version, then we got work fine, but got an "aapt.exe has stopped working" error during the compilation time:

Checked the log records and noticed the appt stops at /res files packaging, and followed by an error of "aapt error. Pre Compiler Build aborted." It turned out that /res/values/ids.xml in the third-party library caused the problem:

  <item type="id" name="quit"/>

Took a closer look and found those ids actually were not used by any other resources. After deleting the ids.xml file the compilation passed.