1

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??

Kanika
  • 10,648
  • 18
  • 61
  • 81

2 Answers2

3

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.

Egor
  • 39,695
  • 10
  • 113
  • 130
1

Make sure there are no other errors that might cause this error, also look at this entry:

R cannot be resolved - Android error

Community
  • 1
  • 1
marcinj
  • 48,511
  • 9
  • 79
  • 100
  • I ahve tried all the methods mentioned here,but still didn't get anything – Kanika Dec 27 '11 at 11:09
  • last time I have seen this error I have misspelled android name in android:id in one of the widget. If your project have not changed then maybe you have made changes to filesystem? changed permissions, folder names, etc.? – marcinj Dec 27 '11 at 11:14