Eclipse - 导入现有项目?

时间:2011-12-10 19:52:12

标签: eclipse project

我有一个项目,我正在尝试添加到我的工作区。但是eclipse无法在我指向的目录中检测到一个新项目。

我怎样才能让eclipse知道某个特定目录包含一个项目?

我的目录包含:

  • 资产
  • RES
  • SRC
  • AndoridManijest.xml
  • proguard.cfg
  • project.properties

5 个答案:

答案 0 :(得分:13)

您只需要将Import->现有项目导入Workspace,然后浏览到项目存在.classpath和.project文件的位置。

答案 1 :(得分:8)

对于Eclipse的新版本,它是File > Import > General > Existing projects into workspace

答案 2 :(得分:1)

喜欢这个

   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.

答案 3 :(得分:0)

此解决方案适用于eclipse

当我从命令行从bit bucket克隆存储库时,我遇到了类似的问题,它会克隆到本地存储库中。所以上面的解决方案没有用,因为它会说文件已经在本地存储库中了。

解决方案:

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

答案 4 :(得分:0)

如果你不能像上面的解决方案一样导入项目,你应该创建一个新的项目有名称procject,你想要导入哪个procject。记得将导入项目放入工作站。