18

I have a project that I am trying to add to my workspace. But eclipse cannot detect a new project in the directory I am pointing to.

How can I let eclipse know that a specific directory contains a project?

My directory contains:

  • assets
  • libs
  • res
  • src
  • bin
  • gen
  • AndoridManijest.xml
  • proguard.cfg
  • project.properties

5 Answers 5

14

You just have to do a Import->Existing Project into Workspace, and then browse to the location where the .classpath and .project files exists for your project.

3
  • there are no .classPath or .project files. I tried creating a brand new project, and I still don't get these files
    – aryaxt
    Dec 10, 2011 at 20:06
  • 1
    Correct me if i am wrong, you are trying to import a project which has been exported by someone else from his eclipse workspace. If yes they should be there at top directory, if No, 1) its not an eclipse project? then how can you expect eclipse to know there is a project which it can recognize. 2) If its supposed to be a eclipse project, then the person who exported must have messed up.
    – FUD
    Dec 10, 2011 at 20:23
  • Thanks, I fixed it. I copied the content of my project from 1 directory to another, and it did not copy the .classpath and .project files. And these 2 files are hidden, that's why I thought they didn't exist. I copied them over to the new directory and it fixed the problem
    – aryaxt
    Dec 10, 2011 at 20:47
11

For the new versions of Eclipse, it is File > Import > General > Existing projects into workspace

3
  • 1
    This was the info I needed. Thanks. Nov 5, 2013 at 20:55
  • Most welcome :) You may want to give Netbeans a try. I've found it to be easier to use than Eclipse. Just another voice in the Eclipse-Netbeans flame-wars :)
    – Nav
    Nov 6, 2013 at 16:18
  • Hmm . . . I actually did use netbeans before when I was working with PHP. I don't remember much of the experience. Nov 6, 2013 at 20:15
2

Like this

   Importing existing projects
    You can use the Import Wizard to  command link import an existing project into workspace.

    From the main menu bar, select  command link File > Import.... The Import wizard opens.
    Select General > Existing Project into Workspace and click Next.
    Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.
    Under Projects select the project or projects which you would like to import.
    Click Finish to start the import.
0

This solution is for eclipse

I had a similar problem when I was cloning repositories from bit bucket from the command line, it would clones into the local repository. So the above solution did not work because it would say that the files were already in the local repository.

The solution:

1. Window > Show View > other > Git repositories
2. Right Click on the git repository tab > import projects
3. navigate to the repository you want to put into eclipse
4. select the third option 'import as general project', if selecting this does not work then view other options and select the option that applies to you
5. finish
0

if you cannot import project like some above solution, you should create new project has name procject like which procject you want to import. Remember to put your import project into workstation.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.