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。

这对我很有效

其他回答

你用的是什么操作系统?我使用Linux Mint。在我的例子中,结果是一个符号链接问题。每次我尝试用符号链接路径创建项目时,它都会给我这个错误。在其他地方创建项目,然后将其迁移到符号链接目录,为我解决了这个问题。

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

今天我意外地解决了这个问题:

以下2个步骤可能不涉及,但不确定:

从(Eclipse菜单)调用*“/Window/Android SDK Manager”并更新a)“Android SDK Tools”“Android SDK平台工具”包 从Eclipse菜单“/Help/Check for Updates”调用并更新Eclipse。重新启动Eclipse。

以下步骤是必要的:

From eclipse menu "/File/Import/Android/Existing Android Code Into Workspace" Browse and select problematic project/or problematic projectS parent directory. Check "Copy projects into workspace". Check "Add projects into working sets". Press finish. [Optional scenario]: If project(s) and their containing folders have been renamed with the fully qualified package names then simply click on project node parent (where you see project package name instead of project's old name) in Eclipse and rename project with old name. Eclipse will rename folder too.

附注:在日蚀朱诺号上测试过。

Edit: Many times have passed since this answer and new Eclipse and Android SDK arrived. They have no much more problems during importing existing projects. The only thing one has to consider before importing is to move project folders(those ones one is willing to import) outside of eclipse workspace dir and then check checkboxes ("copy projects into working sets", "add projects into wokring sets") in import wizard dialog. Also I recommend doing this with latest Android SDK because it no more imports projects with dummy names and does not rename folders as it did in some custom cases.

复制项目到你的工作空间,从eclipse文件>新建>项目创建新的Android应用程序项目,瞧。

进入工作空间,将项目源代码文件夹移动到工作空间之外的另一个区域(如桌面)。确保在eclipse中删除了项目,然后在该目录中从source创建一个新项目。

您可以做的另一件事是尝试创建一个不同名称的项目(来自第一个项目的源),这样工作空间将包含作为功能项目的新项目。然后,进入您的工作区目录,完全删除包含原始项目的文件夹,或者移动它。尝试再次从源代码加载项目,这次使用第二个项目,用正确的名称命名它。或者,您可以尝试将第二个项目重构为第一个项目的名称。