I keep getting an error message in Eclipse when creating a new project.
I have created a workspace at the level
C:\Users\Martin\Java\Counter
Inside Counter there are no files but there is a directory called counter_src which contains source files for the project Counter
So in Eclipse I do, New Java Project, and then uncheck default location and choose the directory
counter_src (which is one level down from Counter)
but it now displays
C:\Users\Martin\Java\Counter\counter_src overlaps the location of another project: 'counter_src'
Now if I create my workspace at
C:\Users\Martin\Java\
which means my counter_src is actually 2 levels down then it allows me, but the problem is that the directory Java contains lots of projects so I wanted to create the workspace in Counter (which has no files) which has subdirectory of counter_src where my source files are.
Also tested creating directory in C:\Users\Martin\Java\ and it appears to work also but I didn't want to create another subdirectory in "C:\Users\Martin\Java\" just to store my workspace for 1 project.
Close Eclipse. Open the location of the workspace and cut paste the entire directory (which contains the ". metadata" directory into the intended location. Restart Eclipse with newly copied folder as the workspace (parent directory of ".
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.)
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:
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
.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With