Pages

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:

  1. yup.., thanq for sharing ur idea..

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

    ReplyDelete
  3. Thanks a ton! :D

    ReplyDelete
  4. Thankx Maaan!!!!!!!!!!!!

    ReplyDelete