Eclipse - 导入现有项目?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8459395/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:45:29  来源:igfitidea点击:

Eclipse - Import an existing project?

eclipseproject

提问by aryaxt

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.

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

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

如何让 eclipse 知道特定目录包含一个项目?

My directory contains:

我的目录包含:

  • assets
  • libs
  • res
  • src
  • bin
  • gen
  • AndoridManijest.xml
  • proguard.cfg
  • project.properties
  • 资产
  • 资源
  • 源文件
  • 垃圾桶
  • 基因
  • AndoridManijest.xml
  • 配置文件
  • 项目.属性

采纳答案by FUD

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.

您只需要在 Workspace 中执行 Import->Existing Project,然后浏览到您的项目的 .classpath 和 .project 文件所在的位置。

回答by Nav

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

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

回答by Joolah

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.

回答by Gioan Nguyen

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.

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

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

回答by mr_sudo

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.

如果您无法像上述解决方案那样导入项目,您应该创建新项目,其名称为 procject,就像您要导入的 procject 一样。请记住将您的导入项目放入工作站。