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
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.
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.
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.
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.
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