Today, when I imported an existing project into eclipse's workspace, I got the following error:
Invalid project description.
D:/eclipse/workspace/report and D:/eclipse/workspace overlap
In the beginning, my project was located in D:/report instead of the workspace directory of eclipse, and its name was test. It worked well then. After googling on the internet, I found the root cause of the problem.
There are two kinds of places where projects can be located:
1) In the "default" location. This means that the project directory is a direct child directory of the workspace directory (aka the platform instance location), and the project directory name matches the project name.
2) Outside the default location, in a directory that is neither a parent or child of the platform instance location. In this case the directory name does not need to match the project name.
As you can see, my project belongs to the second kind initially. When moved to the workspace directory of eclise, it belongs to the first kind. Therefore the name of the project should be the same as the project directory. This can be done by changing the project description file(.project) located in the root directory of the project:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.sysdeo.eclipse.tomcat.tomcatnature</nature>
</natures>
</projectDescription>
After changing the name of the project from test to report, I can import my project into eclipse's workspace successfully.
其实,可以这样解决:新开一个工作空间,重新导入其工程
分享到:
相关推荐
在ROS(Robot Operating System)开发过程中,遇到`rlexception: invalid roslaunch xml syntax: no element found: line 1, column 0`这样的错误信息时,表明当前的`.launch`文件存在XML语法错误。具体来说,可能是...
再和前台对接的时候一直报错:invalid url domain 在网上查找了很多资料,有说端口的问题,也有其它各种原因的,一大堆,最后我发现以上的说法都不准确,这是我配置的地址(错误的地址) 把配置地址的http://去掉...
在XML Schema设计中,"cvc-complex-type.2.4.d: Invalid content was found" 是一个常见的错误信息,这通常意味着在解析XML文档时,遇到了不符合定义的复杂类型的内容。这个错误通常涉及到XML Schema的约束规则,即...
NULL 博文链接:https://wilian.iteye.com/blog/1992365
在Python开发过程中,遇到"error: invalid command ‘egg-info‘"这样的报错通常是由于安装或配置Setuptools库时出现了问题。Setuptools是Python项目构建、安装和管理的工具,而`egg-info`命令用于生成项目的元数据...
Invalid Project File(解决方案).md
Generic syntax highlighter syntaxerror: invalid syntax syntaxerror: invalid syntax syntaxerror: invalid syntax syntaxerror: invalid syntax syntaxerror: invalid syntax
syntaxerror: invalid syntax syntaxerror: invalid syntax syntaxerror: invalid syntax syntaxerror: invalid syntax syntaxerror: invalid syntax
在编程中,特别是在嵌入式系统开发中,我们经常会遇到Invalid Multibyte Character Sequence 警告。这个警告通常来自于编译器,告知我们存在非法的多字节字符序列。今天,我们将深入探讨这个警告的来源、原因和解决...
python——pip install xxx报错SyntaxError: invalid syntax 在安装好python后,进入python运行环境后,因为我要用pip安装开发Web App需要的第三方库,执行pip install aiohttp,发现会报错SyntaxError: invalid ...
在使用 nc 命令时,可能会遇到一些错误,例如“nc: invalid option — ‘e’”错误,这个错误通常是因为系统中安装了多个 nc 命令,导致混淆。为了解决这个问题,我们需要首先确定当前使用的是哪个 nc 命令。 使用 ...
在C++编程中,`std::invalid_argument` 是一个异常类,用于表示当函数或方法接收到不合法或无效的参数时抛出的错误。这个类是`std::logic_error` 的子类,而`std::logic_error` 又是`std::exception` 的子类。`std::...
AssertionError: Invalid device id 仔细检查后发现原来服务器有多个GPU,当时开启了两个进行加速运算。 net1 = nn.DataParallel(net1, device_ids=[0, 1]) 而本地台式机只有一个GPU,调用数量超出所以报错。 改为 ...
解决ZipArchive::getFromName(): Invalid or uninitialized Zip object报错问题
关于pip install xxx报错SyntaxError:invalid syntax的解决方法 声明:1.以下均以pip install requests举例; 2.Windows系统; 首先,看自己是否在python环境中运行了pip,若是,请打开“开始”菜单,输入cmd,找到...
在尝试启动Nginx时,可能会遇到如下的错误提示:“sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory”。这通常意味着系统中缺少必要的...
今天在项目中,使用Mybatis对oracle数据库进行操作的时候,报出ORA-00911: invalid character的错误,检查了一下SQL,发现都书写正确啊,复制到plsql上执行也都没问题,这什么原因呢? 注意:这里说的是用navicat...