Some projects cannot be imported because they already exist in the workspace error in Eclipse

前端 未结 30 2396
予麋鹿
予麋鹿 2020-11-28 01:36

I am trying to import a project that me and my co-worker have been working on.. and keep getting this error after I select-- \"import\" then \"import existing project\" then

相关标签:
30条回答
  • 2020-11-28 02:28

    I had this issue when I deleted a project and tried to import the code again. Eclipse never really deleted the project and still held a reference to the project name/folder in the workspace. I had to created a new project with the same name and my code appeared as it was. I believe this only worked because the project path was never changed.

    0 讨论(0)
  • 2020-11-28 02:28

    I have a slightly different situation whereby my eclipse stops responding and I have had to kill the session. After restarting Juno, then the particular project I was working on disappeared although .project file exists. Trying to import back into Eclipse would yield the same "Some projects cannot be imported .." or "A project with this name already exists" if trying to create a new project.

    In the end, since I was using Working Sets, I managed to find this file .metadata.plugins\org.eclipse.ui.workbench\workingsets.xml. Manually added the missing entry and restarted eclipse and voila, it came back.

    0 讨论(0)
  • 2020-11-28 02:31

    At least on Eclipse Juno, you can toggle on Advanced. Then select [groupid].[artifactid] from the Name Template dropdown. That should make your project uniquely named. (If you keep multiple versions of a given artifact, you can select [groupid].[artifactid].[version] instead). Be sure to click the Refresh button so the changes are visible. Wash, rinse, repeat as needed.

    0 讨论(0)
  • 2020-11-28 02:32

    Another way I just found!

    MOVE the project to some other folder and then import and if required copy to workspace

    0 讨论(0)
  • 2020-11-28 02:32

    I had a similar problem, I have the same repository I wanted to import twice. I renamed the existing project by right clicking on the project > refactor > rename then imported it again.

    0 讨论(0)
  • 2020-11-28 02:33

    EASIEST WAY: Right click on the project (folder that reads "MainActivity") go to Refactor -> Rename and you will get a text field allowing you to rename your project.

    If you get an alert saying your project is out of sync with the filesystem press F5 (refresh) and try again.

    0 讨论(0)
提交回复
热议问题