简体   繁体   中英

Import different versions of a project into Eclipse

I have a project in Eclipse and now I want to import another project with a different name and in different location, but with a same structure(same packages, a lot of same classes...), but when I try to import it, it says " Some projects cannot be imported because they already exist in the workspace". What should I do if I want to have both of two versions of one project? What should I change? Thx.

As the projects would have the same project names in the .project file, eclipse would not allow them to be imported into the workspace.

Open the .project file for the project root, confirm and change its name and then import it.

<projectDescription>
    <name>project1</name>
</projectDescription>

What you can do is create a new project with the name that you want it to be called. Once you do that right click on the new project and click import. You can then import your old project into this one which will have all the same files except a different name.

If the project has a different name that message is a bit strange. Anyway try editing the .project file in the root folder of the second project and change the value of the tag name

The .project file is hidden

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM