Problem with aapt.exe

I am using the latest version of the ADT Bundle package uploaded to the Android developers site. I am on Windows 7. My R.java file does not compile correctly because I received the following error message from Windows:

Error message

Here is a summary of the issues:

Problem signature: Problem Event Name: APPCRASH Application Name: aapt.exe Application Version: 0.0.0.0 Application Timestamp: 52684cb5 Fault Module Name: aapt.exe Fault Module Version: 0.0.0.0 Fault Module Timestamp: 52684cb5 Exception Code: c0000005 Exception Offset: 0003cf2a OS Version: 6.1.7601.2.1.0.256.1 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt 

Now because of this, my R.java file continues to disappear and the following problems appear:

Error console

Pay attention to the first problem in this list.

Now I have completed the following steps about 10 times:

 1. Uncheck build automatically 2. Clean project, 3. Check build config 4. Rebuild project 

If you are going to say to make it as a solution, then do not submit the solution because I am not going to do what I have already done a billion times.

I migrated this project from Android Studio from all its errors, and, in my experience with Eclipse, I have never seen this aapt.exe error. What is aapt.exe and what is its purpose?

Any help is greatly appreciated.

Andrew

+8
java android eclipse r.java-file
source share
8 answers

I would like to thank you for the help provided. After about 2 hours comparing files with files and about 50 Google searches, I fixed them.

It turns out that in my xml file called main_menu.xml, an extra line of code appeared that didn't have to be there. See the code below and read the comment:

 <!-- This top line is the problem --> <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@id/action_about" android:icon="@drawable/action_about" android:orderInCategory="1" android:title="@string/action_about"/> <item android:id="@id/action_settings" android:orderInCategory="100" android:title="@string/action_settings"/> </menu> 

Now the following code is the solution that fixed the R.java file generation error:

 <!-- The xml version/encoding line is gone and everything is working fine now --> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_about" android:icon="@drawable/action_about" android:orderInCategory="1" android:showAsAction="always" android:title="@string/action_about"/> <item android:id="@+id/action_settings" android:orderInCategory="2" android:showAsAction="never" android:title="@string/action_settings"/> </menu> 

So now everything is working fine!

Thanks again for your help!

+11
source share

This is not Andreyโ€™s problem. The problem is the type mismatch. you could declare an object variable with a different type, and you are trying to assign an object of a different type. Thanks

+2
source share

AAPT is an Android creation tool that transfers resources; It is used by both ADT and Android Studio. The most common accident that I know of is related to the https://code.google.com/p/android/issues/detail?id=42752 error. Usually the reason is a link to a nonexistent line in one of your menu resources. Look at this and see if it clears your collapse. See Also Failed to run application: processDebugResources Android Studio .

+1
source share

I had the same problem. I resolve this by deleting the xml menu file.

+1
source share

I would like to thank you for this result, its working tone following the xml code is correct.

 <item android:id="@+id/action_about" android:icon="@drawable/action_about" android:orderInCategory="1" android:showAsAction="always" android:title="@string/action_about"/> <item android:id="@+id/action_settings" android:orderInCategory="2" android:showAsAction="never" android:title="@string/action_settings"/> 

+1
source share

In my case, the problem was the lack of missing xmlns attributes for the namespace prefixes used in the file of the manually created file. In my case, these prefixes are wre app: tools: context :. I used the NetBeans Check XML Validation feature to find and fix syntax problems in my Android XML files. Here's how:

  • Open XML File in NetBeans: File => Open File
  • Right-click in the editor window for the XML file and select Validate XML
  • Bug Fixes Reported
  • Repeat "Validate XML" and correct the error until more errors appear.
0
source share

In my case, the problem was in my menu file (main.xml) in the following line: android:icon="@drawable/ic_action_search"

I refer to a non-existent opportunity. If you encounter such an error, I advise you to check the files of your menu and check whether you are associated with a non-existent resource, for example @string or @drawable.

0
source share

I install the latest ADT always. After 1 or 2 days, when I start eclipse, I get aapt error. I use libGDX to create games, I do not have xml files, such as the problems above.

I am tired of removing and removing ADT daily. Is someone else in the same problem?

0
source share

All Articles