Project has no file! Edit the project properties to set one


While configuring MJAndriod I have got an error as follows:

Project has no file! Edit the project properties to set one.

I have a which us set to a perfect target and works for another application in the same workspace.

Kindly help me resolve this.

10/24/2013 4:58:01 AM

Accepted Answer

If the project already contains a file you can open that file and edit+save it (add a space, save, remove that space, save). That worked for me.

A note with the above discussion: is getting generated automatically by doing the above described process. When I go and remove it, it gets generated again. Neither is it allowing me to edited the automatically generated one. – Compuser7

With respect to the comment quoted above, is indeed an automatically generated class that contains references to all the resources (in the res folder) that belong with your project.

When Eclipse rebuilds, this file is regenerated, since most application (I mean Java code) rely on the fact that there are some resources (images, layouts and string values) available. When you remove the file through Eclipse, Eclipse will see this change in the project as a reason to automatically rebuild (see the options under Project) the project, regenerating the file.

So DON'T try to remove, because Eclipse will regenerate it as soon as you rebuild the project, which will result in a match of patience ;)

11/3/2010 1:11:21 PM

Don't import it into Eclipse, use create new project from existing source in Eclipse.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow