Asked
            
        
        
            Active
            
        
            Viewed 236 times
        
    0
            
            
         
    
    
        cute programmer
        
- 27
- 1
- 11
- 
                    1I believe this is auto generated code. – Tim Biegeleisen Dec 23 '15 at 07:08
2 Answers
2
            
            
        Android R.java is an auto-generated file by aapt (Android Asset Packaging Tool) that contains resource IDs for all the resources of res/ directory.
Clean-Rebuild-Remove gen Folder-Restart 
- If you somehow hit something and created import android.Rin your activity, remove it.
- Run Project -> Clean. This will delete and regenerate R and BuildConfig.
- Make sure Project -> Build Automatically is ticked. If not, build it manually via Menu -> Project -> Build Project.
 
    
    
        Community
        
- 1
- 1
 
    
    
        IntelliJ Amiya
        
- 74,896
- 15
- 165
- 198
1
            
            
        R.java is auto generated code. Please delete your gen (in eclipse) folder and try re-build the app.
 
    
    
        Zumry Mohamed
        
- 9,318
- 5
- 46
- 51
- 
                    i watched tutorials and in those tutorials R.java file was not as long as my eclipse generates. – cute programmer Dec 23 '15 at 07:40
- 
                    What are the tutorials ? R.java file keep resource related information. once the resouces changes it will re-generate with changes. There are two kind of R files . Android has a inbuilt R file for their ids. – Zumry Mohamed Dec 23 '15 at 07:43