Accepted answer

eclipse is erroring because if you try and create a project on a directory that exists, eclipse doesn't know if it's an actual project or not - so it errors, saving you from losing work!

so you have two solutions:

  1. move the folder counter_src somewhere else, then create the project (which will create the directory), then import the source files back into the newly created counter_src.

  2. right-click on the project explorer and import an existing project, select c:\users\martin\java\counter\ as your root directory. if eclipse sees a project, you will be able to import it.



neither of the other suggestions worked for me. i had previously created a project with the same name which i then deleted. i recreated the base source-files (using phonegap) - which doesn't create the "eclipse"-project. i then tried to create an android project using existing source files, but it failed with the same error message as the original question implies.

the solution for me was to move the source-folder and files out of the workspace, and use the same option, but this time check the option for copying the files into the workspace in the wizard.


i know this is older, but wanted to contribute another possibly solution.

if you want to keep the project location, as i did, i found that copying the .project file from another project into the project's directory, then editing the .project file to name it properly, then choosing the import existing projects into workspace option worked for me.

in windows, i used a file monitor to see what eclipse was doing, and it was simply erroring out for some unknown reason when trying to create the .project file. so, i did that manually and it worked for me.


go to the actual file menu and create a new general project.

if the project type isn't recognized, preventing one of these import methods from working, then try this. once you add the generic project, you can then add support for whatever language you require.


i got this error when trying to create a new eclipse project inside a newly cloned git repo folder.

this worked for me:

1) clone the git repo (in my case it was to a subfolder of the eclipse default workspace)

2) create the new eclipse project in the default workspace (one level above the cloned git repo folder)

3) export the new eclipse project from the default workspace to the cloned repo directory:

a) right click on project --> export --> general --> file system
b) select the new eclipse project
c) set the destination directory to export to (as the git repo folder)

4) remove the eclipse project form the workspace (because it's still the one that uses the default workspace)

right click on project and select "delete"

5) open the exported eclipse project from inside the git repo directory

a) file --> open project from file system or archive
b) set the "import source" folder as the git repo folder
c) check the project to import (that you just exported there)


this may not solve op's question, but its relavent


lets say you have an existing project in eclipse,

call projecta, in path g:\wsp\eclipse\projecta


you want to rename the folder name g:\wsp\eclipse\projecta of the project to be g:\wsp\eclipse\folderb;

while keeping the project name projecta as it was.

  • if you directly modify the folder name && delete & re-import that project back into eclipse;

    then you probably get some buggy behavior (-- you cant find the project / import that project properly).

  • if you press alt shift v -- move (refactor) the project;

    then you get the error overlaps the location of another project.


  1. f2 > rename the project to be folderb

  2. alt shift v > move (refactor) the project to path g:\wsp\eclipse\folderb

    • [here, the error of overlap will not present if you have those 2 names to be the same]

      (and now, you successfully renamed the folder name.)

  3. f2 > rename the project back to be projecta


in my case clicking the checkbox for 'import project into workspace' fixed the error, even though the project was already in the workspace folder and didn't actually get moved their by eclipse.


simply "cut" project folder and move it out of workspace directory and do the following

file=>import=>(select new directory)=> mark (copy to my workspace) checkbox 

and you done !


this too took me sometime to figure out.


to create a new maven project under the existing workspace, just have the "use default workspace location" ticked (ignore what is in the grayed out location text input).

the name of the project will be determined by you artifact id in step 2 of the creation wizard.


it was so confusing because in my case, because when i selected to create a new maven project: the default workspace loaction is ticked and directly proceeding it is the grayed out "location" text input had the workspace location + the existing project i was looking at before choose to create a new maven project. (ie: location = '[workspace path]/last looked at project')

so i unticked the default workspace location box and entered in '[workspace path]/new project', which didn't work because eclipse expects the [workspace path] to be different compared to the default path. (otherwise we would of selected the default workspace check box).


in my case checking the check-box

"copy project into workspace"

did the trick.


your have dropped the project in your workspace, and then trying to import it, that's the problem.

this has two solutions:

1. more your project folder outside your workspace in some other location and then try.

2. go to file ---> new project ---> select the existing project radio button ---> browse to the project folder in your workspace ---> finish


assume d:\mydirectory\myworkspace - path of your workspace

drop your project which you want to import in eclipse in mydirectory folder not in myworkspace, and try.


so, i was having the same issue, but trying to import android code via the "import..." menu. when neither of the above two solutions worked on eclipse juno:

  • eclipse -> file -> import -> general -> existing project into workspace (note: not 'existing android project')

  • (projects should import correctly, but should have errors. we must now attach the sdk to the project)

  • right-click on the project, properties->android->project build target choose the appropriate build target (in doubt, use 4.0.3 in the project is newish, and use 2.2 if the project is oldish)

  • click ok

once the project rebuilds, everything should be back in order.

(this was written when eclipse indigo was in vogue, and there may be changes as google updates their tools to cover corner cases.)

Related Query

More Query from same tag