Reputation: 1
Regards.I have some problem whenever i create new android project in eclipse,it is showing error. Error is in "R" class,i guess i am not able to create R class in my project. It is showing R with under red line when i look into MainActivity.java class. Between,i have installed window and all the android-sdk and plug-in cuz i had some window issue previously but now eclipse is not working with new projects. Please help me to resolve out the problem.
Upvotes: 0
Views: 94
Reputation: 118
First of all just check if by mistake you have imported amndroid.R in your imports. If yes then remove that line and clean and refresh you project. IF the probem still exists try adding few widgets as button or textview or anything in your main xm and clean it rebuild it and try to run. If you do some change in xml file you R.java gets generated automatically.
Upvotes: 0
Reputation: 362
First of all try to update ADT plugin by Help -> Check of Updates.
Next open Project Properties -> Java Build Path.
In 'Source' Tab must be 'gen' folder.
'Order and Export' Tab must be in this order:
!!! 4 & 5 must be selected in checkbox !!!
Upvotes: 0
Reputation: 153
-> First close My-eclipse.
-> delete/rename existing workspace.
-> delete .android folder that exists in your Computer User accounts.
-> Just run eclipse with Administrator Privileges.
Then problem is solved..
Upvotes: 1
Reputation: 534
Turn on Project -> Build automatically in eclipse. This will generate new R.java file. Look into your gen-package, if the R.java is available.
Upvotes: 0