Android R.drawables not updating in Eclipse

If your class is not being auto updated by eclipse for new files in a "drawables" directory that you created, it is because the drawable folders that existed originally (drawables-hdpi, drawables-ldpi & drawables-mdpi - which stand for drawables high, low and medium DPI) all resolve to the class R.drawables instead of R.drawables-hdpi etc.

Creating a new "drawables" folder causes Eclipse to throw an error because it would technically lead to a duplicate class - hence the little red cross on your "drawables" folder.

You should move all your images into one of these pre-existing folders then delete the drawables folder you created. Then the references will work as expected.

Facebook Twitter Google+ LinkedIn Buffer
Leave us a Comment

Connect With Us

Get our monthly newsletter with tech tips for business professionals