Eclipse 错误:导入项目时“无法读取项目描述文件”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15370066/
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
Eclipse error: "Failed to read the project description file" on importing project
提问by KingFu
I've just moved to Ubuntu and thought it would be a simple matter of importing my Android projects from my old workspace to my new workspace on Ubuntu. Ha!
我刚刚搬到 Ubuntu,并认为将我的 Android 项目从我的旧工作区导入到我在 Ubuntu 上的新工作区是一件简单的事情。哈!
I goto: New -> Project... -> Android Project From Existing Code. Select "Copy into workspace".
我转到:新建 -> 项目... -> 来自现有代码的 Android 项目。选择“复制到工作区”。
The error I receive is:
我收到的错误是:
Problems occurred while refreshing local changes Errors occurred while refreshing resources with the local file system. Failed to read the project description file (.project) for 'MyProject'. The file has been changed on disk, and it now contains invalid information. The project will not function properly until the description file is restored to a valid state.
刷新本地更改时出现问题 使用本地文件系统刷新资源时出现错误。无法读取“MyProject”的项目描述文件 (.project)。磁盘上的文件已更改,现在包含无效信息。在描述文件恢复到有效状态之前,项目将无法正常运行。
I've checked the project file and there's nothing wrong with it. Any ideas?
我检查了项目文件,没有任何问题。有任何想法吗?
回答by Marcin S.
I would recommend to manually browse the folder with your workspace and delete whatever has been copied from you project. Then "copy" your project into the workspace (also manually). Next:
我建议使用您的工作区手动浏览文件夹并删除从您的项目中复制的任何内容。然后将您的项目“复制”到工作区(也手动)。下一个:
New -> Project... -> Android Project From Existing Code.
But DO NOT checked "Copy into workspace" anymore since you have it over there. That should fix your problem.
但是不要再检查“复制到工作区”,因为你在那里有它。那应该可以解决您的问题。
回答by localhost
I got this error when importing a git repository and auto-adding the projects on Windows 7 after upgrading my machine (I also changed Eclipse versions at the same time).
我在升级机器后导入 git 存储库并在 Windows 7 上自动添加项目时遇到此错误(我也同时更改了 Eclipse 版本)。
I deleted the projects from my Eclipse workspace, then re-imported them, and then it worked.
我从我的 Eclipse 工作区中删除了这些项目,然后重新导入它们,然后它就起作用了。