17

I'm trying to open an existing Android project in Eclipse. I've gone to File > Import > General > Existing Project (or something like that). I've chosen the file project folder. But every time I try to open the folder, all I get is an error.

  • Some projects cannot be imported because they already exist in the workspace*

Is there any other way of opening my project?

9 Answers9

15

You cannot import a project with a name already present in your current Eclipse workspace.

The surest way to work around that is to switch workspace (menu File / Switch workspace), and create a new workspace (in which you will be able to import that project).

switch workspace

A more complex solution would be to try and rename an existing project in your current workspace.

Check other causes in:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I have the same issue . So here is what I did but still no luck 1. I created the new workspace and tried to import. But I still see the same issue 2. I renamed the project name in .project file and tried to import , still i see the same issue . 3. I dont see any projects under Project explorer. What actually is the problem ? Can anyone let me know pls – pranathi Nov 22 '16 at 16:08
10

I faced the same issue, But it is as designed. When people close the project, It simply makes the project unavailable in the eclipse project view. This is why people thinks that it has been completely removed from the view.

So All you have to do is to go to

Window -> Show view -> Project Explorer

Now you will see your project in the Project Explorer sidebar with a different closed folder Icon as shown in this image.

This is how a closed project would look in your workspace when you see from project explorer.

Once you right click and open project you will see the magic you are looking for.

Raja Anbazhagan
  • 4,092
  • 1
  • 44
  • 64
  • I have the same issue . So here is what I did but still no luck 1. I created the new workspace and tried to import. But I still see the same issue 2. I renamed the project name in .project file and tried to import , still i see the same issue . 3. I dont see any projects under Project explorer. What actually is the problem ? Can anyone let me know pls – pranathi Nov 22 '16 at 16:12
  • This solution worked for me. I can't believe I didn't realize the Project Explorer window wasn't open, lol. – AmyW Apr 10 '18 at 13:49
5

I had the same problem and I solved it finally. So, lets say you want to open "TEST" project on eclipse. And you project is in this path: C:\Users\Sabina Comp\Desktop then your workspace should be C:\Users\Sabina Comp\Desktop not C:\Users\Sabina Comp\Desktop\TEST. You can switch workspace by going to File->Switch workspace->other I hope it will help you!

iehrlich
  • 3,572
  • 4
  • 34
  • 43
4

Just delete the .project file and try to open the project again in Eclipse File Explorer :)

1

I faced the same problem. Maybe the cause of your problem is as simple as mine.

I closed (not delete) my project in the Java Browsing view. Unlike the Java view, the project becomes invisible in the Java Browsing view. So I thought I deleted the project. But turns out my project is still in use when I try to import it.

So I went to Java Browsing view and right click the blank space in the Projects panel, click Open Project and the project is back!

user234159
  • 888
  • 3
  • 7
  • 19
0

Right click on a working set --> properties. You should be able to see all the projects that are available in your workspace. Select it. Next all the projects should be listed in your working set.

0

Here's what worked for me:

Right click on the project > Source > Format

Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38
Ram S
  • 1
  • 2
0

I guess you want to create a copy of the existing project and make changes to the new one. Or you have got a project whose name matches the name of the existing project and you want to import the new project as well.

In the first case , you just need to simply copy(Ctrl+C) and paste(Ctrl+P) in the package or project explorer in the eclipse and it will ask you for a new project name -- rather than copying the project folder in the windows explorer and renaming the project folder name.

If you have copied the project in windows explorer and tried importing the project in eclipse you will get the above error Or if u have got a project whose name matches the name of the existing project in eclipse also you will get the above error. Solution for both -- is to delete the .project , .classpath and .settings files and import the project. It will successfully import if u have changed the folder name.

Tip: If its a maven project , you can import it as a Java Project and then RightClick on the project and Configure->Convert To maven project.

nav3916872
  • 978
  • 13
  • 20
0

In my case, problem was - I deleted the code directory from its location. And at the same time I closed Eclipse. So when I reopened Eclipse, it searched for project and couldnt get it.

I restored the code directory at original place. Opened Eclipse. When tried to import project again I found it in closed condition.

I opened it and it started working properly.

Ninad Pingale
  • 6,801
  • 5
  • 32
  • 55