我有一个项目,想要将其添加到我的工作区。但是Eclipse无法检测到我指向的目录中的新项目。
我该如何让Eclipse知道特定目录包含一个项目?
我的目录包含:
- assets
- libs
- res
- src
- bin
- gen
- AndoridManijest.xml
- proguard.cfg
- project.properties
针对Eclipse的新版本,选择文件 > 导入 > 常规 > 从现有项目导入到工作区
就像这样
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.
如果您无法像某些上面的解决方案那样导入项目,您应该创建一个新项目,名称为要导入的项目名称。记得将您导入的项目放到工作站中。
这个解决方案适用于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