Reputation: 10383
I changed the names of a couple of view items in one of my layout files, and suddenly my layout files (R.layout.) and views (R.id.) are getting redlined and not coming up in autocomplete.
I'm importing android.R. But it was working just fine until I renamed the layout items.
Any suggestions?
I've tried refresh, clean, and restarting Eclipse already.
Edit: I changed my import to:
package com.example.techgadgets;
import com.example.techgadgets.R;
but still no go.
Upvotes: 0
Views: 659
Reputation: 66999
Make sure your changed XML resource files do not have any errors. If there are errors in a resource file, then the aapt
tool will not create an R.java file for you.
In my experience, that is the most common reason for the issue you are seeing.
Upvotes: 4
Reputation: 16394
As blackbelt says, you're importing android.R
- you should be importing my.package.R
instead, as this is the generated file that contains references to the entities in your res
folder.
Upvotes: 4