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!


当前回答

将项目源代码和支持库粘贴到任何其他新创建的文件夹中,并尝试从那里导入。这对我很管用。

其他回答

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

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

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

我在Linux中遇到过这个问题,我重命名、删除并重新导入了一个项目。在.metadata的某个地方,它显然还在那里。

我最终通过以下步骤解决了这个问题:

close Eclipse
mv .metadata .metadata_orig
start Eclipse
reset default workspace
reimport projects

这可能并不适用于每个人,特别是如果您已经在多个工作区中有许多项目。但是如果您习惯了重新配置Eclipse(我每次升级到下一个Eclipse版本时都会这样做),那就不太糟糕了。

将项目源代码和支持库粘贴到任何其他新创建的文件夹中,并尝试从那里导入。这对我很管用。

我也一直在为类似的问题而绞尽脑汁。唯一有帮助的就是遵循这篇文章中的步骤。