Tried by rechecking all my resource files no problem in it.Then tried clean and building project but still getting same error then tried validating resource files.followed some stackoverflow links also but issue is not resolved here i am placing the quick option details given in eclipse IDE
Asked
Active
Viewed 61 times
0
-
recheck whether u hv used packagename.R, i doubt u have used android.R file – KOTIOS Jul 30 '13 at 12:12
-
delete ur bin folder and restart eclipse – KOTIOS Jul 30 '13 at 12:15
-
check manifest file once if there is error then r file wont be generated – KOTIOS Jul 30 '13 at 12:16
3 Answers
1
Look at your imports.
import android.R; (will be there)
If that's the case, remove it, so that your project will resolve R not with the default Android Resources class, but with the one auto-generated from your /res/ folder.
Or
Have you updated your ADT recently then you can refer to this answer - https://stackoverflow.com/a/16608570/1441666
0
Try this, Right Click on your project and go to "Android Tools" and select "Fix Project Properties" and after this Go to Project in your toolbar and select "Clean"... It is Sometimes works.. So try it..

Savan Kachhiya Patel
- 1,074
- 8
- 16
0
As per quick fix suggested by eclipse follow this and change the switch statement to if-else by using ctrl+1 then problem resolved.