Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I can't Import existing project to eclipse?

I've been working on some projects in my programming class and copied them to my computer at home so I can keep working on them.

When I tried to import these projects to Eclipse, it said a project named MainActivity already exists.. Although my workspace folder is clear.

As you can see in the picture the import wizard sets "New Project Name" as MainActivity, for all of the projects I'm trying to import.I'm pretty sure thats causing the errors.

How can I import projects and keep the original name without the import wizard changing it to MainActivity?

http://i.stack.imgur.com/NSQ4y.png

like image 787
Noams98 Avatar asked Jul 10 '13 16:07

Noams98


People also ask

Why import option is not working in Eclipse?

Go to Preferences » Java » Editor » Content Assist » Advanced. Make sure Other Java Proposals is ticked/checked. If that does not work simply close the project and reopen it.

Why imports are not showing in Eclipse?

Your Eclipse might have Save Actions enabled. It is accessible at Eclipse Menu => Window > Preferences > Java > Editor > Save Actions => Organize imports (checked) . Also import statemens are collapseable, so all import statements can be shown in one line and only the first one is readable.

How do you resolve some projects Cannot be imported because they already exist in the workspace?

In eclipse click file then select switch workspace then browse and select another folder. Now repeat the same process and this time there will be no error :) Save this answer.


1 Answers

On the screen indicated by your screenshot, you can rename each "MainActivity" to something more unique and relevant by clicking in each text field under "New Project Name". It's not immediately apparent that this field is editable, but it is.

enter image description here

like image 101
Kyle Falconer Avatar answered Oct 17 '22 04:10

Kyle Falconer