Is there any way to integrate Eclipse with Gradle in Android project?(有没有办法在 Android 项目中将 Eclipse 与 Gradle 集成?)
问题描述
我有带有标准 build.gradle 的 Android 项目(我还添加了 android 注释).
I have Android project with standard build.gradle (also I added android annotations).
我还安装了 Gradle 插件(来自 http://dist.springsource.org/release/GRECLIPSE/e4.3/) 到我的 Eclipse (Kepler) 并将项目转换为 Gradle 项目.
Also I installed Gradle plugin (from http://dist.springsource.org/release/GRECLIPSE/e4.3/) to my Eclipse (Kepler) and converted project to Gradle project.
不幸的是,我无法在我的 Eclipse 上运行 Gradle build(在 cmd 行中一切正常).
Unfortunately I cannot run Gradle build on my Eclipse (in cmd line everything works).
我的问题是如何让 Eclipse 像使用 Maven 一样使用 Gradle.
My question is how to make Eclipse works with Gradle just like with Maven.
推荐答案
为了能够使用 Eclipse 构建 Android gradle 项目,我遵循了以下说明:
In order to be able to build an Android gradle project with Eclipse I followed these instructions:
安装这些 Eclipse 插件:
Install these Eclipse plugins:
- Gradle IDE (3.4.0)
- Android 开发工具 (22.3.0)
如果你有一个老式的 android 项目布局,改变你的build.gradle 配置源目录,如 AndroidGradle 用户指南.
If you have an old-style android project layout, change your build.gradle to configure source directories as explained in the Android Gradle User Guide.
如果您有一个 gradle android 项目布局,请在项目的根目录中创建两个符号链接.
If you have a gradle android project layout, create two symbolic links into the root of your project.
ln -s src/main/res res
ln -s src/main/AndroidManifest.xml AndroidManifest.xml
ln -s src/main/res res
ln -s src/main/AndroidManifest.xml AndroidManifest.xml
希望对你有帮助!
这篇关于有没有办法在 Android 项目中将 Eclipse 与 Gradle 集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有没有办法在 Android 项目中将 Eclipse 与 Gradle 集成?


- Safepoint+stats 日志,输出 JDK12 中没有 vmop 操作 2022-01-01
- Eclipse 插件更新错误日志在哪里? 2022-01-01
- value & 是什么意思?0xff 在 Java 中做什么? 2022-01-01
- Jersey REST 客户端:发布多部分数据 2022-01-01
- Spring Boot连接到使用仲裁器运行的MongoDB副本集 2022-01-01
- 如何使用WebFilter实现授权头检查 2022-01-01
- 从 finally 块返回时 Java 的奇怪行为 2022-01-01
- C++ 和 Java 进程之间的共享内存 2022-01-01
- 将log4j 1.2配置转换为log4j 2配置 2022-01-01
- Java包名称中单词分隔符的约定是什么? 2022-01-01