ChatGPT解决这个技术问题 Extra ChatGPT

How to open existing project in Eclipse

I kind of feel stupid, but I just can't get it to work....

I have an existing Android project copied from my other pc, in the folder

c:\projects\trunk\android\emergency

(I created that project on the other pc, copied it to my new pc and the other pc is given away) Now I want to open the project in Eclipse. So I THINK I tried everything, but I can't seem to get it to work...

I looked for something like 'open project', but didn't find it.

Then I tried 'import', but that wouldn't let me import it because it was the same workspace (I use the same filelocations and workspace location as on the other pc)

Then i tried creating a new workspace and import it there. Then it complained about have no project, that i first had to create one. So i did create a dummy one in the new workspace, imported the project, and it copied everything to the new workspace, and placed it below the dummy project.

I am SO stuck, can you help me?

Btw, this is the Eclipse i'm using: Eclipse SDK Version: 4.2.0 Build id: I20120608-1400

Try File > New > Project... > Android Project From Existing Code
Do i have to check 'copy in existing workspace'?
I usually do it, so I have the project in my workspace where others are.
If you have copied your project into workspace than you don't need to check 'copy in existing workspace'.
Don't copy your project from pc into workspace, copy it elsewhere and let the eclipse copy it into workspace by menu commands above and checking 'copy in existing workspace'.

b
biegleux

Try File > New > Project... > Android Project From Existing Code. Don't copy your project from pc into workspace, copy it elsewhere and let the eclipse copy it into workspace by menu commands above and checking copy in existing workspace.


Indeed - all the world's iOS programmers thank you! :) Now if I can only find an "AVD" ...
I tried this but it still tried to run a project that I created and deleted a week ago. Unintuitive doesn't even begin to describe the Android/Eclipse SDK farce.
L
Lanaru

It's the "Import existing project into workspace" option under Import->General.

See: http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-importproject.htm


There's a checkbox on the next screen to decide whether or not to copy. I was looking for plain Java, not Android, and Lanaru's answer helped.
Project > Import > General > Select Root Directory > (do NOT select copy projects into workspace). This is useful if you use Eclipse outside scope of Java project as well, such as Ruby projects or C projects.
Also, in a left toolbar you should press a button "Restore" in order to view Navigator. Also an advise of @tim doyle may help: Window->Show View->Navigator.
t
tim doyle

Window->Show View->Navigator, should pop up the navigator panel on the left hand side, showing the projects list.

It's probably already open in the workspace, but you may have closed the navigator panel, so it looks like you don't have the project open.

Eclipse using ADT Build v22.0.0-675183 on Linux.


You something is seriously wrong with a UI when the question "how do I open an existing project" has to be asked. This answer was what I needed, and a long, long way from anything like "Open existing project," eh? Thank you.
What do you do then? Do you double click on it or what? I double click on it, and it opens up a project configuration file. Worst IDE ever. So frustrating that I have to use this!
M
MemoryLeak

File > Import > General > Existing Projects into workspace. Select the root folder that has your project(s). It lists all the projects available in the selected folder. Select the ones you would like to import and click Finish. This should work just fine.


but, the projects are already in the right place. When i import them in a workspace, don't they get copied?
@Michel, No, they won't get copied.
What if it doesn't list them?
R
Ramin Ahmadi

i use Mac and i deleted ADT bundle source. faced the same error so i went to project > clean and adb ran normally.


V
Vinay W

Right click in navigator-Import-existing project..-select the base directory of your project


I tried that, but it gave me a copy of the project in the new workspace?
R
Ramanand Bhat

Assume that the application folder is in your pen drive.

open eclipse, go to import,select Android,In Android select "existing android code into workspace"

next and finish.

Ramanand Bhat


Already been mentioned in e.g. the accepted answer. Anything more to add?