Android 将项目导入 Eclipse 时项目描述无效

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12677093/
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-08-20 11:25:02  来源:igfitidea点击:

Invalid project description when importing project into Eclipse

androideclipse

提问by Malloc

I know this question is posted already here, but that doesn't solve my problem.

我知道这个问题已经发布在这里,但这并不能解决我的问题。

I pull a project from github branch, and when i try to import it : File->Import->General->Existing projects into workspacethen Select root directoryand here when i click on Finishbutton i get Invalid project description.

我从 github 分支拉出一个项目,当我尝试导入它时:File->Import->General->Existing projects into workspace然后Select root directory当我点击Finish按钮时,我得到Invalid project description.

I am pulling the project into a folder called Android, this folder contains the main folder of the project MyAndroidProjectwhich i imported in Eclipse.

我将项目拉到一个名为 的文件夹中Android,该文件夹包含MyAndroidProject我在 Eclipse 中导入的项目的主文件夹。

I don't know what is wrong here.

我不知道这里出了什么问题。

回答by Michael Jess

I know I'm late to the party, but just in case someone else is stuck at this point, just like me a couple of minutes ago: You could try File>Import>Existing Android Code into Workspace. I had the Git repository I wanted to import directly in my workspace. Still, I needed to check the Copy projects into workspaceoption in order to make it work.

我知道我迟到了,但以防万一其他人被困在这一点上,就像几分钟前的我一样:您可以尝试文件>导入>现有 Android 代码到工作区。我有一个想要直接导入到我的工作区中的 Git 存储库。尽管如此,我仍需要检查将项目复制到工作区选项以使其正常工作。

Edit

编辑

I just checked out the link from one of the comments above, recommending File>Import>General>Existing Project into Workspace. I should mention that the eclipse project metadata was not under version control in my case, rendering an import as existing project impossible! This solution applies to existing android code without .project files etc.

我刚刚查看了上述评论之一中的链接,推荐文件>导入>常规>现有项目到工作区。我应该提到 eclipse 项目元数据在我的情况下不受版本控制,无法将导入作为现有项目!此解决方案适用于没有 .project 文件等的现有 android 代码。

Edit 2

编辑 2

Just another remark: I realized recently that this issue only seems to occur if the project rootalso is the repository root, much like this:

再说一句:我最近意识到这个问题似乎只有在项目 root也是存储库 root 时才会发生,就像这样:

workspace  
└─ project root  
   └┬ .git
    ├ src
    └ ...

When I moved the project just one directory level lower, the issue disappeared.

当我将项目移动到低一级目录时,问题就消失了。

回答by user274294

Just move the project folder one directory lower ( make another folder in the directory & copy your project into that folder. Now import the project with this newly created version. )

只需将项目文件夹向下移动一个目录(在目录中创建另一个文件夹并将您的项目复制到该文件夹​​中。现在使用这个新创建的版本导入项目。)

回答by rohitkadam19

Had same issue, changed the workspace to one directory above the project and then imported project. Worked for me

有同样的问题,将工作区更改为项目上方的一个目录,然后导入项目。为我工作

回答by Calabacin

I've just read this very old question. The problem is in the Eclipse specific folders.

我刚刚阅读了这个非常古老的问题。问题出在 Eclipse 特定的文件夹中。

Simply remove .settings and .project and reimport.

只需删除 .settings 和 .project 并重新导入。