37

I am trying to organize my code for SVN so I can work from multiple locations without issue and potentially add more developers. The problem is that I can't get the code into a new project easily. I am trying to create a project from existing code.

Once I select the folder, the "main activity" shows up, but I can never use it. I've tried deleting all the .project files and what not in the folder as well, but the thing is always greyed out and I can never get it to import.

Why is it greyed out? What do I need to do to get it to import?

-- ADT Build v21.0.0-519525

Import Projects Grey

teynon
  • 7,540
  • 10
  • 63
  • 106
  • 3
    Your workspace *is* C:\Users\Tom\workspace, thus the project is already in the workspace and cant be imported as a new project. – Machinarius Jan 16 '13 at 02:32
  • So why are they grayed out? If I pull it from a folder up, it will show some projects as available, but most are gray. – teynon Jan 16 '13 at 02:34

7 Answers7

65

I played around with this a bunch and found out that it was conflicting with another similarly named activity that already existed in the workspace. The error message "Select at least one project" was covering up that message. It would appear very quickly and then switch to select at least one project.

To get around this, I deleted all the projects from my workspace. I didn't know which one it was because I am making an app that is being versioned and branded for different companies.

teynon
  • 7,540
  • 10
  • 63
  • 106
  • 1
    So I find when importing libraries they get named after the directory they're in, in my case 2 of them were in a directory called "library" so the naming conflict caused this issue. F2 rename existing "library" package (without updating references) to something more useful and then you can import the second one. – darnmason Oct 16 '13 at 09:12
  • This did not work. I delete all projects from current workspace, re-import from random local drive and back to the ["nothing happens after clicking Finish" problem](https://www.google.com/search?q=eclipse+open+project+nothing+happens&oq=eclipse+open+project+nothing+happens&aqs=chrome..69i57.12771j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8) – StacyM Jan 18 '14 at 17:38
  • @StacyM: If your `Finish` button is not grayed out, then you have a different problem. First post in your Google search suggests updating all of your tools. – teynon Jan 19 '14 at 23:27
  • Still not fixed after a year and a half! – Tyler Pfaff May 03 '14 at 01:41
  • Wroked for me: I did Refactor -> rename the project with the same name and then I was magically able to import the project! Thanks a lot! – aveschini Jan 28 '15 at 11:32
14

I had a hard time with the same problem with TrivialDrive. Try to check "Main Activity" from the project names you have in your workspace. if it exist, you'll get this error.

r_19
  • 1,858
  • 1
  • 20
  • 16
  • 2
    In recent versions of Eclipse, you can re-name the new project in the dialog during import instead of deleting old projects. Thus avoiding conflicts and letting the Finish button be enabled. – Fraggle May 12 '14 at 18:14
2

Solution A:

1) Close Eclipse, 2) when it starts it will ask for new working directory, choose something different then your default one.

if it is not asking for "new working directory"

Solution B: 1) Go to File > Switch Workspace > Other 2) Choose a new Working-Directory (not the same!)

enter image description here

After that it should be possible importing projects

user1767754
  • 23,311
  • 18
  • 141
  • 164
1

Just delete the ".project" file in your project folder (it's hidden on Linux, use "ls -a" to show), then from Eclipse, choose Create Android Project from existing source. It worked for me..

Thats it.Cheerzz..

Shailendra Madda
  • 20,649
  • 15
  • 100
  • 138
1

It's grayed because project name equals to the name of existing project within workspace. Solution: Use "Existing Android Code Into Workspace" import. Type "Root Directory". Change "New Project Name" field directly in Import Projects wizard. Do the following: first press path text (right from checkbox) in "Project to Import" field then go to "New Project Name" field to change name.

1

just go to eclipse-workspace and delete .metadata file restart eclipse open project

0

I had this problem when I needed to build an apk file as a one-off from an svn tag. I managed it by creating a new workspace and switching to it. After that New->Project->Android->Android Application From Existing Code worked as you would hope.

Bandjalong
  • 353
  • 1
  • 3
  • 14