Forums Register Login

How to get back R.java after cleaning the project in eclipse?

+Pie Number of slices to send: Send
Hi ,
I have configured the Android SDK in eclipse and all things are working fine,
But when I clean the project in eclipse R.java cleans out and it is not possible to get
back
. How to get back R.java after clean the project in eclipse?

or Is this solution that ...Not to clean the project just build and run?
Thanks in Advanced .
+Pie Number of slices to send: Send
R.java should be re-created automatically when you clean a project. Does running build brings it back?
+Pie Number of slices to send: Send
@ Misha van Tol
thanks for reply.
Yes I was tried by cleaning the project but there is shows errors at project icon in eclipse and project will not run because of error
and I dont understand what exactly error.
+Pie Number of slices to send: Send
I also faced the same problem couple of times. R.java is a auto-generated file that stores information about your drawables. If after cleaning project and restarting eclipse doesn't solve your issue then you have to create new project and copy paste your code to new project.
+Pie Number of slices to send: Send
 

Pramod P Deore wrote: If after cleaning project and restarting eclipse doesn't solve your issue then you have to create new project and copy paste your code to new project.


@ Pramod P Deore
Thats right ... but creating a new project after each time cleaning is not the proper way.
+Pie Number of slices to send: Send
No need to create new project each time because after cleaning project every time you will not face this problem.
+Pie Number of slices to send: Send
It's possible that Eclipse has decided to import your R.java file into one or more of your classes.

Every so often, when clean/build doesn't seem to be working, if I check my import block at the top of the class file(s) I'm writing, I'll see

import blah/R.java

(or similar).

Delete, save and rebuild. It fixes the problem for me. I wish I knew what caused it.
+Pie Number of slices to send: Send
I have also experienced this problem. What works for me is to delete the "gen" directory then clean and rebuild. Works every time.
+Pie Number of slices to send: Send
@ Jenifer Private and Peter Raftos
thanks guys your things realy works.
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 14085 times.
Similar Threads
IJ 11 + Android + ActionBarSherlock not recognizing R.java
Maven project crash after clean
using gwt dev mode difficulities.
m2eclipse: Resources not copied over to target folder
Strange problem occures after updating Eclipse.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:40:44.