I have updated SDK for the latest but still I am getting this error .R cannot be resolved to a variable. I know its not generating R.java. what should I do to resolve this issue.
            Asked
            
        
        
            Active
            
        
            Viewed 443 times
        
    0
            
            
        - 
                    have u updated your ADT revision? – Michael Shrestha Jun 26 '13 at 05:57
- 
                    Restart eclipse and then clean your project! – RobinHood Jun 26 '13 at 05:57
- 
                    http://stackoverflow.com/questions/17162479/what-is-the-procedure-for-generating-r-java-in-android-eclipse-juno/17162535#17162535. try this – Raghunandan Jun 26 '13 at 05:57
- 
                    [refer here](http://stackoverflow.com/a/16603961/2345913) and then ofcourse try clean build your project.. – CRUSADER Jun 26 '13 at 05:58
- 
                    @Michael Shrestha YES i HAVE UPDATED IT TO LATEST adt 22. – URAndroid Jun 26 '13 at 06:01
3 Answers
0
            update your Platform-Tools and install Android Build tools too... 
and restart your eclipse... 
hope this helps..
check here for more info..
 
    
    
        Community
        
- 1
- 1
 
    
    
        Michael Shrestha
        
- 2,547
- 19
- 30
0
            
            
        Assuming your Java code is correct, most likely your cause is an error in a resource or your AndroidManifest.xml file that is preventing R.java from being regenerated. To figure out what is going on:
- Look for red X marks in the Package Explorer for resources or the manifest
- Look in the Console for error messages
- Look in the Problems view for error messages
Refer this for other solutions: R cannot be resolved - Android error
-1
            
            
        Delete R.java file from your source folder. Now Clean your project Click on Project >> Clean >> Clean Project selected below >> Select your project from list >> ok.
and also try this.
Right Click on your Projectname >> Android Tools >> Fix project Property
 
    
    
        Preet_Android
        
- 2,332
- 5
- 25
- 43
 
    