为 Eclipse 添加 Gradle 支持

Adding Gradle support to Eclipse

我想将 Gradle 添加到 Eclipse。我的目标是将 Gradle 管理添加到一些 Android 项目的依赖项中,这些项目当时使用 Eclipse 构建并且转换为 Android Studio 项目并没有很好地结束。

我已经在 eclipse 中安装了 Buildship 插件。我已通过右键单击项目 -> 配置 -> 添加 Gradle 环境将 Gradle 添加到项目中。

现在呢?我在可以管理依赖项的项目中没有看到任何 Gradle 文件。

不要使用 Eclipse 进行 android 开发,它很慢而且缺少工具。 此外,Eclipse 支持已于 Google 正式结束。

With the release of Android Studio 2.2, the time has now come to say goodbye to the Eclipse Android Developer Tools. We have formally ended their support and development. There's never been a better time to switch to Android Studio and experience the improvements we've made to the Android development workflow.

Source

This documentation 对从 Eclipse 迁移 Android Studio 很有帮助。如果您在迁移过程中遇到了哪些迁移问题,我们将无能为力。

还有一些对您有用的链接:

Gradle Integration for Eclipse

Gradle Plugin Documentation for Eclipse

Useful Gradle Tutorial for Eclipse - 这包含第 5 节中所需的说明。使用 运行 gradle init 完成第 5 节后,您应该右键单击该项目 -> Gradle -> 刷新 Gradle 项目。然后将新的 Gradle 文件添加到您的项目中。