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!
当前回答
今天我意外地解决了这个问题:
以下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.
其他回答
而不是从Android ->现有的Android代码导入工作空间,你必须使用通用->现有的项目到工作空间。这可能是一个解决方案。
将项目源代码和支持库粘贴到任何其他新创建的文件夹中,并尝试从那里导入。这对我很管用。
有各种各样的场景,但在我的例子中,我想保留文件夹及其内容,因为它已经从.git中签出。但是,我需要能够使用Eclipse修改源代码和其他内容。
我发现问题是.cproject和.project文件的路径信息非常特定于环境(与我的环境不匹配)。
我所做的是:
创建了一个新的空文件夹(名称不同),并创建了一个新的 指向该文件夹的工作区。 签出或复制。git项目/文件夹到空文件夹中。 然后导入工作区中的“常规”“现有项目”。
关键似乎是用不同的名称创建顶层的空白工作空间。
我希望这能帮助到一些人。
转到项目的。project文件,确保它显示的名称与项目文件夹中显示的名称相同。如果不是,请更改名称。它会起作用的。
你用的是什么操作系统?我使用Linux Mint。在我的例子中,结果是一个符号链接问题。每次我尝试用符号链接路径创建项目时,它都会给我这个错误。在其他地方创建项目,然后将其迁移到符号链接目录,为我解决了这个问题。
推荐文章
- 我如何处理ImeOptions的完成按钮点击?
- 如何防止Eclipse在启动时挂起?
- 模块是用不兼容的Kotlin版本编译的。其元数据的二进制版本为1.5.1,预期版本为1.1.15
- 如何在Android工作室添加“libs”文件夹?
- 使用什么api来绘制其他应用程序(如Facebook的Chat Heads)?
- getDefaultSharedPreferences和getSharedPreferences的区别
- 如何模拟按钮点击使用代码?
- Android Webview给出net::ERR_CACHE_MISS消息
- Parcelable遇到IOException写入序列化对象getactivity()
- Java编译器级别与安装的Java项目facet的版本不匹配
- 如何在Android中动态更改菜单项文本
- 如何将Base64字符串转换为位图图像,以显示在一个ImageView?
- 新版本的Android模拟器问题-模拟器进程已终止
- 没有与请求版本匹配的NDK版本
- 升级到Ubuntu 13.10后,Eclipse菜单不会显示