BaijnathG / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

Cleaning android project in eclipse (ADT 10) causes false error for missing R.java #377

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
OS: Mac OS X 10.6.6
Eclipse: Helios SR2
ADT: 10.0.0
ADK: r10

1. Start with any Android project that normally compiles
2. Make sure auto refresh workspace setting is off (default)
3. Do Project -> Clean on that project

Expected: the project fully compiles.

Observed: ADT quickly reports "ERROR: Unable to open class file 
/path/to/R.java: No such file or directory.  R.java is present anyway.

** This error is not entirely deterministic.  It seems LESS likely to happen on 
small projects and MORE likely to happen on large projects (or multiple project 
cleans), especially those with large Android library projects.  Perhaps there 
is a race condition somewhere.

Possible aftermath of the error may be seen in one or more of the following 
problems:

- The project is marked with missing 'gen' source folder and build path errors.
- The project is marked with an appt parse error
- Java source is marked with missing R class errors

The error on the project can be resolved by saving a file in the project 
without making any changes (causing a rebuild to happen).  It's just the 
Eclipse project clean function that puts the project into a funky state.  I 
wonder if the aapt tool isn't being run in the correct order after a clean.

Original issue reported on code.google.com by beafd...@gmail.com on 4 Mar 2011 at 1:31

GoogleCodeExporter commented 9 years ago
Ugh, so sorry.  I entered this into the wrong bug tracking tool.  So sorry.  :-(

Original comment by beafd...@gmail.com on 4 Mar 2011 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by sandordo...@google.com on 4 Mar 2011 at 1:49