Issue
I am building an application and I added a new activity to generate a view. I compiled it. My application can not find anything that is on the format R.id.xxx
or R.layout.xxx
, I've tried also cleaning my project, closing Eclipse and opening Eclipse again, but nothing. The most strange thing is that before everything was working well. But now it can not recognize even the R.layout.main
that is default of my principal activity. Anyone have an idea?
Also I have tried almost everything here: R cannot be resolved - Android error but no result!
Solved
Thanks to woopsy, also I found the reference to this kind of problem
http://source.android.com/source/using-eclipse.html
it happens because Eclipse sometimes imports R when you press the combination ctrl+shift+O
Solution
Remove all your imports for the Activity and then have eclipse fix imports. I have had problems where eclipse wants to import a different R than the one I need.
Answered By - Woodsy
Answer Checked By - Robin (JavaFixing Admin)