Reputation: 6884
I'm building an Android app using Eclipse. If I have a single Drawable folder with several PNG files in it, the UI editor in Eclipse fails to load the images I place on ImageButtons. I get failed to convert and couldn't resolve @drawable errors in the log and the buttons just show up blank in the editor. If I run the app on the emulator it works fine though.
If I copy my single Drawable folder to the 3 default folders that Eclipse creates for new projects (I think they are named, Drawable-hdpi, Drawable-mdpi, etc)... then Eclipse works fine, and so does the Emulator. If I delete all folders except the medium DPI folder, Eclipse works fine, but the Emulator (my app actualy) crashes when I try to load an activity that uses any of the resources.
In my understanding, any of the above combinations should work (just maybe some ugly scaled images). Eventually I do plan to figure out which bitmaps look the worst and create multiple versions of those, but for this phase of my project I would prefer to just have one of each bitmap and let the OS scale them. What is my best bet for doing this?
Worst case I'll just let the Eclipse IDE complain and not show my images in design view -- I work in XML source view a lot anyway.
Upvotes: 3
Views: 4004