简体   繁体   English

Eclipse不导入Android项目

[英]Eclipse not importing Android projects

I am trying to import the projects I made on other machine. 我正在尝试导入我在其他计算机上制作的项目。 So I copied the workspace folder from other machine into current PC and replaced the default workspace folder that was created when I installed fresh eclipse. 因此,我将工作空间文件夹从另一台计算机复制到当前PC,并替换了在安装新的Eclipse时创建的默认工作空间文件夹。 After replacing workspace, when I try to import the projects from the workspace, I get error "Invalid Project description". 替换工作空间后,当我尝试从工作空间导入项目时,出现错误“无效的项目描述”。

  • What should I do to import all my projects in eclipse? 我应该怎么做才能将所有项目导入Eclipse? Thanks 谢谢

I've found that when I try to import an existing project into my workspace, it only works if I select the General->Existing Projects into Workspace . 我发现,当我尝试将现有项目导入到我的工作区时,只有在选择General->Existing Projects into Workspace ,它才有效。 If I select Android->Existing Android Code into workspace then I have an issue where it doesn't import properly. 如果我选择Android->Existing Android Code into workspace ,则会出现无法正确导入的问题。

Maybe you are facing a similar issue. 也许您正面临类似的问题。

Try the following: 请尝试以下操作:

 File >> New >> Android Project 

Then choose: 然后选择:

 Create project from existing source

And put your project path 并放置您的项目路径

OK try this, Zip your project folder. 确定,尝试此操作,压缩项目文件夹。 File->Import->General->Existing Projects into Workspace->Select archive file or http://code.google.com/p/android/issues/detail?id=8431 How to import existing Android project into Eclipse? 文件->导入->常规->现有项目到工作区->选择归档文件或http://code.google.com/p/android/issues/detail?id=8431 如何将现有的Android项目导入Eclipse?

File->Import->General->Existing Projects into workspace This works perfectly. File-> Import-> General-> Existing Projects进入工作区这完美地工作。 Try it. 试试吧。

For anyone, if the above doesn't work for you, you may want to check that the .classpath and .project files are there. 对于任何人,如果上述方法都不适合您,则可能需要检查.classpath和.project文件是否存在。 I had a similar experience where I was trying to import my project files' from my svn working copy. 我曾尝试从svn工作副本导入项目文件时遇到过类似的经历。 However, it shows up as a greyed out unselectable project. 但是,它显示为灰色的无法选择的项目。 Copying .classpath and .project file from a local backup made it work. 从本地备份中复制.classpath和.project文件可以正常工作。

I was facing same issue. 我面临着同样的问题。

Eclips cannot import project if it is already exist in workspace. 如果工作空间中已经存在项目,则Eclips无法导入项目。 Double check if you already have a project with same name. 仔细检查您是否已经有一个同名项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM