I have this problem with my android source in Eclipse. I tried to import com.R; but only the R cannot be resolved disappeared. I got the id cannot be resolved now. I "developed" in Eclipse w开发者_如何学Pythonith Android a few months ago too, but there wasn't the ID cannot be resolved problem. What can I do? It is a fresh installed Eclipse+Android ADT+Emulator+ eg...
Are you sure you're not importing android.R
but instead, your generated R file, i.e. com.myproject.R
?
I would delete R, And right click your project and go to Android Tools > Fix project properties. That should work.
精彩评论