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。

这对我很有效

其他回答

Suppose you have something like: /prj/workspace/prj1 /prj/workspace/prj2 And your eclipse workspace is in /prj/workspace level (i.e. /prj/workspace/.metadata). If you're having problem importing prj1 and prj2, you can either move your .metadata somewhere else (/prj/.metadata, /prj/eclipse/.metadata, etc.) or create a sub level in workspace so that it looks like: /prj/workspace/android/prj1 /prj/workspace/android/prj2 And import prj1 and prj2 again. In another word: as long as prj1, prj2, and .metadata are not in the same level it will be fine.

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

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

这对我很有效

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

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

单击Finish。

这对我很有效

我自己也在这个问题上挣扎了一段时间,我认为发生这种情况的原因是因为(对于Android)有两种方法将项目导入到工作区

1)文件>导入>General>现有项目到工作区 2)文件>导入>Android>现有代码到工作区

这里描述的错误与方法2有关。

对于方法1),如果项目已经在工作区中,只要取消选中“将项目复制到工作区”框,就不会出现重叠问题。

编辑: 还有第三种方法,在我最初的文章中没有提到。

3)文件>新的>其他>Android>现有的Android项目到工作区

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

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

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

File -> Switch Workspace

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