SEARCH W7R

Sunday, July 08, 2012

Android/Eclipse Programming Solution "Failed to convert @drawable/image.png into a drawable"

w7r.blogspot.com

While trying to set up an xml reference to an image file I placed in drawable-hdpi folder, the following error occured: EclipseFailed to convert @drawable/image.png into a drawable.

Chances are that you are reading this because you too ran into the same problem. Luckily, I've got your solution!
All you need to do is change the xml reference from "someimage.png" or "someimage.jpg" to "someimage". So simply, eliminate the file extension for whatever resource it was and the error should dissapear.

4 comments:

Unknown said...

yup.., thanq for sharing ur idea..

neil shannon said...

Thank you, i've been banging my head off a wall with this one for the last hour!

Anonymous said...

Thanks a ton! :D

Smean said...

Thankx Maaan!!!!!!!!!!!!