views:

77

answers:

1

I am experiencing an annoying problem with an Android project in Eclipse. All my other Android projects are okey (at the moment). Whenever I perform a clean (Menu:Project->Clean...) the project gives an error and I can't compile/run the app. The error is:

Project 'Project Name' is missing required source folder: 'gen'

As soon as I edit some code the problem disappears until I perform a clean again. I can also right-click on the gen-folder and delete it. Eclipse will recreate the gen-folder and the problem disappears until I perform a clean. This is not a showstopper but it is really annoying since I sometimes have to do a clean before I run the app.

I'm using the following:
OS: Ubuntu 10.04 (Linux CYLON 2.6.32-24-generic)
Eclipse: Helios Release (Build id: 20100617-1415)
Android dev tools: 0.9.7.v201005071157-36220 (the latest as of today)

A: 

AFAIK, If Everything is Perfect you have know need to touch or delete the gen Folder.

As soon as I edit some code the problem disappears until I perform a clean again.

What are the things you have changed in your code. Mainly about the Resources. It makes the difference upto my knowledge. dont see only the Logcat and Consider the Console window also shows some error in the red color. First clear that errors and then clean and build your project.

Edit:

Check for:

  1. Is there Android Package is Missing?
  2. Right Click--> Properties--> Java Build Path--> Order and Suppport Tab--> Check res or src folders are selected?
Praveen Chandrasekaran
Thanks. Logcat-tab in Eclipse shows nothing (since the app is not running). The console-tab shows nothing when I perform a clean. The Problems-tab is showing error message I wrote above. When I edit any code (like adding a meaningless space-char) and save it Eclipse "does something" and the error message disappears.
darius
@darius: It may some chances that for Missing Android Package. do you have such thing in your project folder on Eclipse.
Praveen Chandrasekaran
Thanks again. 1)I can't see any mention of Android Package Missing. 2)I compared with a working Android project and it looks the same. (The checkboxes are brown without an actual "check" in both projects. I can't seem to activate a "check".)
darius
@darius: goto Properties--> Android--> Select a Project Build Target Again. and also mention the `<uses-sdk android:minSdkVersion="4" />` in the Manifest too.
Praveen Chandrasekaran
Project Build Target is set to Google APIs, Platform 1.6, API Level 4. The Manifest has the tag <uses-sdk android:minSdkVersion="4" /> at the end, just before the manifest closing tag.
darius