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 集成?
基础教程推荐
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
