如何将 IntelliJ 项目转换为 Eclipse?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5781137/
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
How to convert IntelliJ project to Eclipse?
提问by Nirmal- thInk beYond
I have one IntelliJ project and I want to open it in Eclipse, so what should I do?
我有一个 IntelliJ 项目,我想在 Eclipse 中打开它,我该怎么办?
采纳答案by uncaught_exceptions
There is an export to eclipse option in Intellij Under file menu.
Intellij 下文件菜单中有一个导出到 eclipse 选项。
This option will generate you the necessary .project and .classpath files that will be used by eclipse. Personally, I would remove any IDE dependencies using some dependency management systems like Maven or Apache IVY. ( Is system the right term?)
此选项将为您生成 eclipse 将使用的必要 .project 和 .classpath 文件。就个人而言,我会使用一些依赖管理系统(如 Maven 或 Apache IVY)删除任何 IDE 依赖。(系统是正确的术语吗?)
回答by TommyN
I had the same issue and (I don't have Intellij) but doc_180's comment pointed me in the right direction. Here is a simple solution. In Eclipse create a new blank Android project. Copy the .project and .classpath files and the .settings folder to the Intellij folder. Edit the .project file and change the name of the project.
我遇到了同样的问题并且(我没有 Intellij)但是 doc_180 的评论为我指明了正确的方向。这是一个简单的解决方案。在 Eclipse 中创建一个新的空白 Android 项目。将 .project 和 .classpath 文件以及 .settings 文件夹复制到 Intellij 文件夹。编辑 .project 文件并更改项目的名称。
You should now be able to Import the project in Eclipse by right clicking and selecting "Import->Existing Project into Workspace".
您现在应该能够通过右键单击并选择“导入->现有项目到工作区”来在 Eclipse 中导入项目。
I see this is an old question, but thought I should add this answer for others Googling it like me ;)
我看到这是一个老问题,但我想我应该为像我一样在谷歌上搜索它的其他人添加这个答案;)
回答by MonteChristo
Without access to IntelliJ to export and convert the project, try the following.
无法访问 IntelliJ 导出和转换项目,请尝试以下操作。
In STS or Eclipse create an empty project first, then, select File -> Import and choose General -> File System. In the resulting dialog box, select the root folder of the IntelliJ project as source and the empty project as the destination.
在 STS 或 Eclipse 中先创建一个空项目,然后选择 File -> Import 并选择 General -> File System。在出现的对话框中,选择 IntelliJ 项目的根文件夹作为源,选择空项目作为目标。
For unit tests, add the test folder as a source folder to the build path (right-click on the folder, select Build Path -> Use as Source Folder).
对于单元测试,将测试文件夹作为源文件夹添加到构建路径(右键单击该文件夹,选择构建路径 -> 用作源文件夹)。
The projects I import this way run without any further modifications, including the tests.
我以这种方式导入的项目无需任何进一步修改即可运行,包括测试。