问题
I am doing an application in which I didnt changed anything and still it is giving me an error on R.java file that R cannot be resolved to a variable...
I have done all the things like: project->clean
close and open the project again
close the eclipse and restart it agagin but no solution...
I am not able to fix this problem....This problem is so much irritating....Can anyone pls help me in this case??
回答1:
There is probably an error in one of your resource files, you need to properly check all your resources to find if any of them contain errors. The resource with an error will have an error red cross on its icon. Hope this helps.
回答2:
Make sure there are no other errors that might cause this error, also look at this entry:
R cannot be resolved - Android error
来源:https://stackoverflow.com/questions/8643873/r-java-is-not-generating-r-cannot-be-resolved-to-a-variable