[Logo]
Forums Register Login
How to get back R.java after cleaning the project in eclipse?
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 .
R.java should be re-created automatically when you clean a project. Does running build brings it back?
@ 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.
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.
 
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.
No need to create new project each time because after cleaning project every time you will not face this problem.
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.
I have also experienced this problem. What works for me is to delete the "gen" directory then clean and rebuild. Works every time.
@ Jenifer Private and Peter Raftos
thanks guys your things realy works.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 21, 2017 14:21:14.