Java Model Exception when cleaning android project

Android woes

I thought that I would add this little note just in case there is anyone out there who has also suffered this problem. It can occur if you remove an android project from your workspace and then decide to add it again as a new project. In my case I had exported the project from subversion and then deleted the original (for reasons of sanity in my repository).

So the problem occurs when you add the project back to your workspace. I’m presuming that some of the settings get really confused when you try to add a project that used to be part of the workspace. I’m not really concerned with what but more interested in the fix. Here is the error:

Java Model Status [gen [in HelloActivity] does not exist]

It occurs when you try to clean your project and you just get a red cross on your project folder and nowhere else; very irritating!

So the fix

You may only need to remove the following files:
.DS_Store (if it exists)
and then clean the project

If this doesn’t work try this:

  1. backup workspace .metadata file
  2. Restart eclipse
  3. In eclipse, from windows menu – preferences re-enter the android SDK location
  4. Now add your project as an existing android project

You might need to re-import any dependencies and mess about with the ordering after that but otherwise it should have done the job.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s