android - 从android gradle插件生成eclipse项目

标签 android eclipse gradle

我可以使用 android 插件构建一个 gradle 项目。我想知道我们是否可以生成一个有效的eclipse android 项目?我在下面添加了

apply plugin: 'android'
apply plugin: 'eclipse'

当我说:gradle eclipse 我得到了

E:\proj\Platform2.0\mobile\Android\Common>gradle --build-file adt_build.gradle eclipse                                
The TaskContainer.add() method has been deprecated and is scheduled to be removed in 
Gradle 2.0. Please use the cr:eclipseClasspath                                                                                                     
:eclipseJdt                                                                                                       
:eclipseProject                                                                                                   
:eclipse                                                                                                                                                                                                                            
BUILD SUCCESSFUL                                                                                                  

但是当我在 eclipse 中导入生成的项目时...它确实有 gradle 从依赖项导入的 jar 文件。

有什么想法吗?

最佳答案

我觉得我的回答可能没有真正的答案,但希望它符合“任何想法?”的条件。无论如何...

如果不查看更多 gradle 文件就很难知道,但我发现 gradle 警告让您非常怀疑。 TaskContainer.add() 并没有引起我的注意,但建议确实如此。

Please use the cr:eclipseClasspath

现在显然已弃用并不自动意味着“这行不通”,但 gradle 建议您使用 cr:eclipseClasspath 并且听起来您在使用 eclipse 类路径时遇到了问题。很难假设警告与您的问题无关。你有没有沿着那条路线做过任何调查?

关于android - 从android gradle插件生成eclipse项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16940714/

相关文章:

java - Android -- SQLite + SharedPreferences,2 个线程同时读/写?

java - 我可以将 Eclipse 插件项目用于我自己的插件吗?

java - 如何在 Eclipse 中设置 -Xss?

android - 在 mac osx 上使用 Eclipse 检测不到小米 mi4

java - 通知声音无穷无尽,永不停息

android - 如何使用Gradle在Android Studio上运行旧的Eclipse项目?

android - Android Studio的“Unable to resolve superclass/Link of class failed”错误

android - 如何修复 ProGuard/R8 导致的崩溃?

android - list 合并失败依赖 com.google.firebase :firebase-analytics:17. 2.2

android - 用于 kotlin 的 Android 中的静态等效项,以避免处理程序内存泄漏