Wednesday, June 06, 2012

Eclipse displaying error icon on Android Project

When working with Android Project files, sometimes we work directly from within Eclipse studio and sometimes outside of the studio. Assume that in one our android project, we are in need of one complex functionality to be performed. We Google and get hold of java source that does exactly what we require. So, we go ahead and download the java source file and add it using Eclipse studio to our android project. Having added that we notice a couple of errors in the downloaded java file. Instead of fixing it right away, we decide to fix at a later point of time and close the eclipse editor (assuming a long break time).

Returning back we learn that our R & D team have implemented the complex functionality and now we decide to get rid of the downloaded java file. We move to the src folder location using windows explorer and delete the file. (Note that this file was added using the eclipse studio and on top of that the downloaded file had errors). Now we open the eclipse studio and notice that there are no error icons displayed for any files but the android project.

We try the following ways to get rid of the error but all goes in vain:
1. Clean the project but still the error remains
2. Refresh the project but still the error remains
3. Fix Project Properties from Android Tools but still the error remains

The fix that worked in our case is removing the .metadata folder from the project root location. This folder seems to hold reference to all the files added using eclipse studio.

No comments: