I am trying to create a new project from existing source code. I keep getting the following error: "Invalid Project Description", project path "overlaps the location of another project" with the same name. The reason is that I created that project from the source code before, but then I deleted that project and deleted its whole directory, before adding the source code directory again. I tried everything like cleaning and restarting, but nothing worked. I looked in my workspace directory, but there are no traces for the old project. There are several questions around this problem such as this Attempting Android Notepad Tutorial - Exercise 1 - More problems, but none of the answers worked for me!


当前回答

我使用以下步骤解决了这个问题:

File ->导入 单击General,然后在Workspace中选择Existing Projects 单击Next 浏览项目目录 单击Finish。

这对我很有效

其他回答

如果你希望以以下方式从现有源代码打开一个新项目:

File -> Import -> General -> Existing Project into Workspace

你仍然有“无效的项目描述”的信息。 我只要进去就能解出来

File -> Switch Workspace

选择一个最近的工作场所。

以我为例,当我打开Eclipse并将计算机设置为睡眠模式,然后醒来工作时,我出现了错误“无效的项目描述”。我需要做的唯一一件事就是关闭我的Eclipse并再次打开它。 我看到当打开Eclipse并让计算机进入睡眠或休眠时,会犯许多其他奇怪的错误!

这个问题也快把我逼疯了,但我知道原因是什么。问题是eclipse不够聪明,不能在自定义的工作空间文件夹中创建与项目同名的文件夹。

解决这个问题的方法是确保你所有的项目都在一个与你的项目名称匹配的文件夹中,否则它会直接将你所有的项目文件转储到这个目录中。您最终看到这个错误的原因是因为它认为您正在将一个项目放在另一个项目中(可能读取了项目配置文件)。

I noticed this is especially a problem when not using the default workspace path. The way I solve this problem is to just add the Project Name to the end of location. So let's say you are putting a project named "HelloWorld" into /Users/name/Documents/projects/android/, you would want to manually add "HelloWorld" to the end of it, like this: /Users/name/Documents/projects/android/HelloWorld. This would ensure that the project is put in it's own folder called "HelloWorld" and not inside some other project. Be sure that if there are any projects not within folders into a folder of the same name as the project to solve the errors.

以下是我做的非常有效的方法。我只是在通用下导入了一个现有的项目,而不是导入一个android项目。

我使用以下步骤解决了这个问题:

1) File -> Import
2) Click General then select Existing Projects into Workspace
3) Click Next
4) Browse the directory of the project

单击Finish。

这对我很有效