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!
当前回答
将需要的代码复制到工作区文件夹之外的某个地方 使用该文件夹中的现有代码创建一个新项目 项目创建后,右键单击它并重构> Move 把它放到工作区文件夹中。(使用默认位置)
其他回答
这个选项解决了我的问题。
链接:http://fledglingsnook.wordpress.com/2012/08/09/eclipse-issue-overlaps-the-location-of-another-project/
解决这个问题最简单的方法就是将项目移动到另一个文件夹并导入。这是因为您已经在该文件夹中有了该项目(或具有相同名称的项目)。当您删除project时,eclipse仍然保留对它的引用
我自己也在这个问题上挣扎了一段时间,我认为发生这种情况的原因是因为(对于Android)有两种方法将项目导入到工作区
1)文件>导入>General>现有项目到工作区 2)文件>导入>Android>现有代码到工作区
这里描述的错误与方法2有关。
对于方法1),如果项目已经在工作区中,只要取消选中“将项目复制到工作区”框,就不会出现重叠问题。
编辑: 还有第三种方法,在我最初的文章中没有提到。
3)文件>新的>其他>Android>现有的Android项目到工作区
如果你希望以以下方式从现有源代码打开一个新项目:
File -> Import -> General -> Existing Project into Workspace
你仍然有“无效的项目描述”的信息。 我只要进去就能解出来
File -> Switch Workspace
选择一个最近的工作场所。
将项目源代码和支持库粘贴到任何其他新创建的文件夹中,并尝试从那里导入。这对我很管用。
推荐文章
- android:在触摸移动时移动视图
- 如何以编程方式将ID分配给视图?
- Eclipse错误:间接引用所需的.class文件?
- 如何解决INSTALL_FAILED_DEXOPT错误?
- 有没有办法自动安装Android SDK ?
- 如何检查一个视图在Android中是否可见?
- Android是否保留。apk文件?如果有,在哪里?
- 如何在Eclipse中只使用键盘去一个错误?
- 如何在Eclipse中生成Javadoc注释?
- 如何在EPF Composer 1.5中删除一个规程?
- 在Android 5棒棒糖中,通知栏图标变成白色
- 从URI获取真实路径,Android奇巧新的存储访问框架
- 如何检查JSON键是否存在?
- ImageView -有高度匹配宽度?
- 如何确定在android文件的MIME类型?