7

I was trying to build my android application after adding an image, that i planned on using, to the drawables folder. The project worked perfectly fine before, but after running the project, an error message showed up saying, Unparsed Aapt Error. The error shows up on the src folder. I have tried to Clean my project but the R.java class just disapears.

Any suggestions on how to fix this problem????

6
  • Without looking at the error, we will have no clue. Jul 20, 2011 at 18:48
  • Remove image and see if this fixes it. If so, try re-saving image with any editor and then add it again to drawable.
    – inazaruk
    Jul 20, 2011 at 18:49
  • Kumar - how do you want me to show you the error?
    – YoKaGe
    Jul 20, 2011 at 18:51
  • inazaruk-if i delete the image the errors go away soo it has to be something to do with the pic...
    – YoKaGe
    Jul 20, 2011 at 18:54
  • Am i adding it wrong cuz all i do is drag the pic into the drawables folder??
    – YoKaGe
    Jul 20, 2011 at 18:55

7 Answers 7

13

1) clean project

2) close project

3) try again, if still fails: repeat 1 & 2 and then:

4) exit Eclipse and re-enter.

5) set the target in the run configuration to manual and try

There is a bug filed for this error - http://code.google.com/p/android/issues/detail?id=14607

Till its resolved we need to bear with the issue.

0
2

I found another "fix" for this issue in the Android Developer's Google Group that explains that sometimes the error has been resolved but eclipse is simply unaware of it.

Apparently in this case you can also simply delete the error by right clicking it.

2
  • Hey Strongbad, why haven't you answered any emails lately? Aug 18, 2012 at 5:07
  • 1
    Then you should kick him until he fixes it. It was time for a new one anyhow. Outdated technology--too pixely--you need good graphix. Did you only answer this question so you could use the word "DELETED?" Aug 18, 2012 at 19:07
1

Right click on your project > properties > android > in project build target : select android 5.0 with API level 21 or select the same android version with api level which is set in android-support-v7-appcompat project.

The api level and android version should be same in android-support-v7-appcompat as well as in your project.

0

Reason: Android SDK or Platform SDK are not consistent with Eclipse plugin.

Solution:

  1. Open Android SDK Manager and update: Android SDK & Android Platform SDK
  2. Open Eclipse and update plugin
0

I tried all these steps and nothing was fixing the appt error 138 that I was getting. As it happens, I was using TFS plugin at work and at some point the encoding of one of the xml file was changed from 0 on the server to ASCII on the local copy. I had to rollback to the last change set before the problem and then make sure to overwrite the offending file with the version from the server with encoding 0 to fix the problem.

0

In most cases changing the image file qualifier from PNG's to png's will fix the Android "Unparsed aapt error(s)"

0

Actually the problem arises when we paste the image in drawable folder. The image name must contain only [a-z0-9_.] letters. I mean file names anywhere in "res" must only contain lowercase letters, numbers, or underscores. The link https://teamtreehouse.com/forum/beginners-android-app-help explains it very well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.