Tommy
Tommy

Reputation: 27

Android clean project deleted every R.java

I updated my SDK version via eclipse, after that i did a project clean. Now every R.java class of all my projects is gone.

Hints like "some .xmls are wrong" doesn'T work, because i didnt change anything in the .xmls..

Upvotes: 0

Views: 919

Answers (2)

Michael Yaworski
Michael Yaworski

Reputation: 13483

What I did was go to Project --> Build Project

That worked once. The second time it didn't. The second time, I did this:

  1. Create a brand new workspace.
  2. File --> Import... and import the project that didn't have the R.java file.
  3. It will generate the R.java file for you. So either use this workspace, or copy and paste this R.java file into your old workspace that didn't have it. Save everything and possibly restart Eclipse. It will work (even though it showed errors for a few minutes for me, they went away).

Upvotes: 1

Shrikant Ballal
Shrikant Ballal

Reputation: 7087

If you have updated the adt to 22, then there is a common problem if you are using any external library.

In ADT 22 by default external libraries are unchecked.

Please right click on project > properties > android > java build path > order and export > check Android private libraries

Source: https://plus.google.com/photos/117122118961369445953/albums/5878509263473846433/5878509268379848162?authkey=CL3Frb-S_qj-fQ

Upvotes: 0

Related Questions