将eclipse项目导出为gradle

时间:2021-11-11 11:19:39

I have been trying to export my eclipse project as a gradle build file to use it with Android Studio but I can't seem to make it work correctly. When I click "Finish" nothing happens. If I repeatedly click it, I can see a progress bar that shows for a millisecond and then vanishes.

我一直试图将我的eclipse项目导出为一个gradle构建文件,以便在Android Studio中使用它,但我似乎无法使它正常工作。当我点击“完成”时,什么也没有发生。如果我重复点击它,我可以看到一个进度条,显示一毫秒,然后消失。

My ADT is version 22.3 (which is the latest) and I have tried all of the solutions I found on google as well.

我的ADT是22.3版本(最新版本),我也尝试了谷歌上的所有解决方案。

Similar questions can be found here: Eclipse Gradle export of Android project does nothing Cannot generate gradle.build files from Eclipse

类似的问题可以在这里找到:Android项目的Eclipse Gradle export没有什么不能生成Gradle。从Eclipse构建文件

As you can see, there is not really a solid solution for this problem, but people wrote they created it manually. I don't know how to do so though.

正如您所看到的,对于这个问题并没有一个真正的解决方案,但是人们编写它们是手工创建的。我不知道怎么做。

Is there any solution for this problem that I haven't heard of? If not, how can I create the file manually?

对于这个我还没听说过的问题,有什么解决办法吗?如果没有,如何手动创建文件?

3 个解决方案

#1


16  

Apparently, the current edition of the export-to-Gradle support in Eclipse cannot handle a project that is attached to an Android library project. In that case, you would need to (temporarily) detach the Android library project, export the main project, then modify build.gradle to use the library project (manually or via Android Studio).

显然,Eclipse中exportto - gradle支持的当前版本不能处理附加到Android库项目的项目。在这种情况下,您需要(暂时)分离Android库项目,导出主项目,然后修改构建。逐步使用图书馆项目(手动或通过Android Studio)。

#2


0  

Generating build.gradle files FIRST FOR ALL of the projects in my dependencies ONE AFTER ANOTHER worked for me.

生成构建。梯度文件首先为所有项目在我的依赖,一个接一个为我工作。

I generated build.gradle (with export wizrd for facebook, play and whatever other projects I imported and used in my project).

我生成的构建。gradle(为facebook、play和其他我在项目中导入和使用的项目输出wizrd)。

#3


0  

For not trivial Android project you should do it manually.

对于重要的Android项目,您应该手动执行。

For the latest build.gradle template for classic Android project check gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle.

最新的构建。经典Android项目的gradle模板,检查gh.c/N/ N/ N -1/b/m/ o.n.e.c /docs/ Android /build.gradle。

You can continue to develop in Eclipse with ADT and run Gradle build using Nodeclipse/Enide Gradle for Eclipse (marketplace)

您可以继续在Eclipse中使用ADT进行开发,并使用Nodeclipse/Enide Gradle对Eclipse进行构建(市场)

Some screenshots for Gradle for Eclipse:

Eclipse渐变的一些屏幕截图:

将eclipse项目导出为gradle

将eclipse项目导出为gradle

#1


16  

Apparently, the current edition of the export-to-Gradle support in Eclipse cannot handle a project that is attached to an Android library project. In that case, you would need to (temporarily) detach the Android library project, export the main project, then modify build.gradle to use the library project (manually or via Android Studio).

显然,Eclipse中exportto - gradle支持的当前版本不能处理附加到Android库项目的项目。在这种情况下,您需要(暂时)分离Android库项目,导出主项目,然后修改构建。逐步使用图书馆项目(手动或通过Android Studio)。

#2


0  

Generating build.gradle files FIRST FOR ALL of the projects in my dependencies ONE AFTER ANOTHER worked for me.

生成构建。梯度文件首先为所有项目在我的依赖,一个接一个为我工作。

I generated build.gradle (with export wizrd for facebook, play and whatever other projects I imported and used in my project).

我生成的构建。gradle(为facebook、play和其他我在项目中导入和使用的项目输出wizrd)。

#3


0  

For not trivial Android project you should do it manually.

对于重要的Android项目,您应该手动执行。

For the latest build.gradle template for classic Android project check gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle.

最新的构建。经典Android项目的gradle模板,检查gh.c/N/ N/ N -1/b/m/ o.n.e.c /docs/ Android /build.gradle。

You can continue to develop in Eclipse with ADT and run Gradle build using Nodeclipse/Enide Gradle for Eclipse (marketplace)

您可以继续在Eclipse中使用ADT进行开发,并使用Nodeclipse/Enide Gradle对Eclipse进行构建(市场)

Some screenshots for Gradle for Eclipse:

Eclipse渐变的一些屏幕截图:

将eclipse项目导出为gradle

将eclipse项目导出为gradle