An error occurred while importing the Eclipse project: Invalid Project Description

Source: Internet
Author: User

An error occurred while importing the project in eclipse today: Invalid project description ........

The reason is that in the specified workspace of eclipse, the project name must be the same as the name in the. project file under the project!

References:

Http://hi.baidu.com/dragon_zone/blog/item/be2bbd1244d689cec3fd7802.html

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 shocould 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.

 

You can copy project resources instead of directly overwriting the project. I understand that you want to change the project name, right? If you change the name of a project, you can create a new project, copy the original resources, and put them in the project. Then you can use the project normally or import the project. Of course, you cannot change the project name.

 

Http://topic.csdn.net/t/20041118/11/3564254.html

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.