Reputation: 2815
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.
Upvotes: 3
Views: 5935
Reputation: 7521
Faced the same issue what worked for me was doing the below
File -> Invalidate Cache/Restart
Upvotes: -1
Reputation: 3005
Are there any uppercase letters in the image names? If so, switch them to lowercase, you can't use uppercase in image names.
Upvotes: 2
Reputation: 6263
check your imports at the top of the file. Without samples, this is a guess, but PROBABLY there is:
import Android.R
but it should say:
import myProject.R
Upvotes: 11
Reputation: 40754
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?
Upvotes: 5