I am trying to create a new project from existing source code. I keep getting the following error: "Invalid Project Description", project path "overlaps the location of another project" with the same name. The reason is that I created that project from the source code before, but then I deleted that project and deleted its whole directory, before adding the source code directory again. I tried everything like cleaning and restarting, but nothing worked. I looked in my workspace directory, but there are no traces for the old project. There are several questions around this problem such as this Attempting Android Notepad Tutorial - Exercise 1 - More problems, but none of the answers worked for me!
-
1It is a bug, as far as I know. I think, [here][1] is a good workaround. [1]: stackoverflow.com/questions/4054216/…– GangnusCommented May 18, 2012 at 9:16
-
10You have to import it as an existing project, not as an existing code into workspace:)– adrianCommented Dec 3, 2013 at 12:47
-
26A very stupid glitch that still happens in 2014.– caiosm1005Commented Mar 19, 2014 at 1:41
-
3Adrian's answer should be the accepted answer– jscripterCommented Jul 8, 2014 at 21:03
-
1It's still occur in 2014 but @adrian answer helped me! Thank's!– GoroCommented Oct 30, 2014 at 8:09
23 Answers
Go into your workspace, and move your project source code folder to another area outside of your workspace (like the desktop). Make sure the project is deleted in eclipse, then create a new project from source from that directory.
Another thing you could do is try creating a project of a different name (from the first project's source), so that the workspace will contain the new project as a functional project. Then, go into your workspace directory and absolutely delete the folder that contained the original project, or move it. Try loading the project from source again, this time using the second project, by naming it with the correct name. Or, you could try refactoring the second project back to the first's name.
-
Thanks. I tried creating a new directory within the same workspace and put the source code directory there. That worked! I was hoping there might be a clean way to do it without changing/moving directories or workspace.– deepkimoCommented Apr 26, 2011 at 0:56
-
5In Eclipse, there is an "Import" option in the file menu, although I'm not sure if it will use the same folder as in your workspace. Eclipse really likes to create its own directories... Commented Apr 26, 2011 at 17:10
-
61.import>General>Existing Project into Workspace.... uncheck Copy projects into workspace....– zachariaCommented Mar 21, 2014 at 2:43
-
1@zacharia unfortunately this didn't work for me. "copy project" was unchecked and I still get the error. Eclipse sucks. I can't just open the probject. I have to have it somewhere else and import it.– NickSoftCommented May 26, 2014 at 12:32
-
1I got the full BSOD and Eclipse is just messed up, this is but one of many. Now it's finally trying to load, but literally taking forever on CPU. I reinstalled eclipse to no avail, but thanks for this. One step closer now. Commented Jun 9, 2014 at 5:56
I have struggled with this issue myself for a while and I think the reason it happens is because (for Android) there are two ways to import projects into the workspace
1) File>Import>General>Existing Project into Workspace
2) File>Import>Android>Existing Code into Workspace
The errors described here are related to method 2).
For method 1) there will be no overlap problems as long as you uncheck the "Copy Projects into Workspace" box if the project is already in the workspace.
Edit: There is a third method that wasn't in my original post.
3) File >New>Other>Android>Existing Android Project into Workspace
-
25What worked for me was doing #2 above but checking the Copy Projects into Workspace. Apparently, it wasn't enough for me to just physically put the files in a new workspace, I also had to use this Copy option to have Eclipse recognize that it was there. Solved another problem too of an external .jar being recognized as well.– JazzmineCommented Aug 4, 2012 at 16:07
-
I also had to use the Copy option to make Eclipse recognize that it was there. Commented Oct 16, 2012 at 21:12
-
Using the copy option worked for me. The problem is then that it doesn't get recognized as Git anymore...– NickCommented Dec 14, 2012 at 18:00
-
If you follow option #1, the project will not be an Android project. You will have to go to Project properties and select an Android version for the project. You may also have to click Android->Fix Project Properties.– jfritz42Commented Dec 19, 2012 at 0:03
-
Even i had same issue, initially i imported the project using Existing Code into Workspace techniq, but when i create new workspace & import the project i was getting the problem. So i tried Existing Project into Workspace way, & my problem solved– NarutoCommented Jan 6, 2013 at 11:22
Instead of import from Android -> Existing Android Code Into Workspace, You must use General->Existing projects into workspace. It's probably a solution.
Today I accidentally solved the issue:
Below 2 steps may not be involved but not sure:
- Call from (Eclipse menu)* "/Window/Android SDK Manager" and update a) "Android SDK Tools" b) "Android SDK Platform-tools" packages
- Call from Eclipse menu "/Help/Check for Updates" and update Eclipse. Restart Eclipse.
Steps below are necessary:
- From eclipse menu "/File/Import/Android/Existing Android Code Into Workspace"
- Browse and select problematic project/or problematic projectS parent directory.
- Check "Copy projects into workspace".
- Check "Add projects into working sets".
Press finish.
[Optional scenario]: If project(s) and their containing folders have been renamed with the fully qualified package names then simply click on project node parent (where you see project package name instead of project's old name) in Eclipse and rename project with old name. Eclipse will rename folder too.
P.S. Tested on Eclipse Juno.
Edit: Many times have passed since this answer and new Eclipse and Android SDK arrived. They have no much more problems during importing existing projects. The only thing one has to consider before importing is to move project folders(those ones one is willing to import) outside of eclipse workspace dir and then check checkboxes ("copy projects into working sets", "add projects into wokring sets") in import wizard dialog. Also I recommend doing this with latest Android SDK because it no more imports projects with dummy names and does not rename folders as it did in some custom cases.
This problem drives me crazy as well but I know what the cause of it is. The problem is that eclipse is not smart enough to create a folder with the same name of your project within your workspace folder if it is custom.
The way to solve this is to make sure all of your projects are in a folder with the name that matches your Project Name, otherwise it will dump all of your project files straight into the directory. The reason why you end up seeing that error is because it thinks you are putting a project inside another project (probably reads the project config file).
I noticed this is especially a problem when not using the default workspace path. The way I solve this problem is to just add the Project Name to the end of location. So let's say you are putting a project named "HelloWorld" into /Users/name/Documents/projects/android/, you would want to manually add "HelloWorld" to the end of it, like this: /Users/name/Documents/projects/android/HelloWorld. This would ensure that the project is put in it's own folder called "HelloWorld" and not inside some other project. Be sure that if there are any projects not within folders into a folder of the same name as the project to solve the errors.
-
This is the problem I was having. It expects for the workspace to be somewhere far removed from the actual project, which makes no sense to me, but what do I know? I just try to make it happy. Commented Jun 29, 2012 at 22:19
I have been banging my head against the wall with a similar problem. The only thing that helped is following the steps in this post.
I solved this problem with using the following steps:
1) File -> Import
2) Click General then select Existing Projects into Workspace
3) Click Next
4) Browse the directory of the project
Click Finish!
It worked for me
- Copy the code you want somewhere outside your workspace folder
- Create a new project using existing code from that folder
- Once the project is created, right click on it and Refactor > Move it into the Workspace folder. (use default location)
I solved this problem with using the following steps:
File -> Import
Click General then select Existing Projects into Workspace
Click Next
Browse the directory of the project
Click Finish!
It worked for me
Here is what I did that worked great. I just imported an existing project under general instead of importing an android project.
What operating system are you using? I use Linux Mint. In my case it turned out to be a symbolic link issue. Every time I tried to create the project with the symlink path, it would give me that error. Creating the project elsewhere, and then migrating it to the symlinked directory solved it for me.
The easiest way to solve this problem is just to move your`s project to another folder and import it. This is because you have already had this project(or project with the same name) in that folder. And when you delete project, eclipse still retains a reference to it
Suppose you have something like:
/prj/workspace/prj1
/prj/workspace/prj2
And your eclipse workspace is in /prj/workspace level (i.e. /prj/workspace/.metadata). If you're having problem importing prj1 and prj2, you can either move your .metadata somewhere else (/prj/.metadata, /prj/eclipse/.metadata, etc.) or create a sub level in workspace so that it looks like:
/prj/workspace/android/prj1
/prj/workspace/android/prj2
And import prj1 and prj2 again. In another word: as long as prj1, prj2, and .metadata are not in the same level it will be fine.
I've been having this problem in Linux, with a project that I renamed, removed, and reimported. Somewhere in the .metadata, it's still there evidently.
I finally solved it by the following steps:
close Eclipse mv .metadata .metadata_orig start Eclipse reset default workspace reimport projects
This may not work for everyone, especially if you already have lots of projects in multiple workspaces. But if you're used to reconfiguring Eclipse (which I do every time I upgrade to the next Eclipse release) it's not too bad.
This option fixed my issue.
-
While this may answer the question, it is better to provide the actual information here and not just a link. Link-only answers are not considered good answers and will probably be deleted. Commented Mar 2, 2014 at 9:26
paste the project source and support libs to any other newly created folder and try to import from there. It worked for me.
Copy the project into your workspace, create new Android Application Project with the same name from eclipse file->new->project and voila.
Go to the .project file of your project make sure it display the same name as displayed in project folder. if not change the name. it will work.
There are a variety of scenarios, but, in my case, I wanted to retain the folder and it's contents, as it had been checked out from .git. However, I needed to be able to modify the source and other stuff using Eclipse.
I found the problem was that the .cproject
and .project
files had path information that was very environment specific (and did not match my environment).
What I did was this:
- Created a new empty folder(with a different name) and created a new workspace pointing to that folder.
- Checked out or copied the .git project/folder into the empty folder.
- Then imported, General, Existing projects in Workspace.
The key seemed to be creating the top level empty work space with a different name.
I hope this helps someone.
If you wish to open a new project from an existing source code in the following way:
File -> Import -> General -> Existing Project into Workspace
you still have the message "Invalid Project Description". I solve it just by going in
File -> Switch Workspace
and choosing one of the recent workspaces.
I got rid of my issue by changing File > Workspace and then, after the restart, reset the Workspace again.
In my case, I had error "Invalid Project Description" when i open Eclipse and put my computer into sleep mode then wake up to work. The only thing i need to do is close my Eclipse and open it again. I see when open Eclipse and put computer to sleep or hibernate will made many other strange error!
File > Import > Existing Maven Projects > Click on Next. If your project already exists in the workspace in eclipse. On trying to import it again to eclipse - You might have to change the location of it ( like initially I had my project in downloads folder, now I created another folder and need to give this location from browse. A pop up opens to select a Root Directory : Give the recent location of the folder and under Projects enable the checkbox. And now under "Advanced settings" change the name Template and click on " Finish"