Search code examples
javaandroidfiledrawable

Can't reference drawable PNG in Java?


I have about 10 pictures in my drawable folder. But when referencing some of them in Java like this:

R.drawable.example

Only about 6 of the pictures show up when pressing CTRL+Space. If I try to reference some of the pictures, they don't show up in the CTRL+Space dialog box. If I try to type the filename manually, I get an error in my Java, as if they don't exist in my drawable folder.


Solution

  • Have you tried right-clicking on your res folder within the Eclipse Package Explorer, selecting refresh, and then going to Project -> Clean, and then rebuilding your project?