简体   繁体   English

Gradle插件版本与Real Gradle版本Android Studio冲突

[英]Gradle plugin version conflicting with realm gradle version Android Studio

When I am using "com.android.tools.build:gradle:3.1.2" with "io.realm:realm-gradle-plugin:5.1.0" it is working fine, but I want to use realm version 1.2.0. 当我将“ com.android.tools.build:gradle:3.1.2”与“ io.realm:realm-gradle-plugin:5.1.0”一起使用时,它工作正常,但是我想使用领域版本1.2.0 。 Now it is conflicting and giving error like: 现在,它正在发生冲突并给出如下错误:

Error:android-apt plugin is incompatible with the Android Gradle plugin. 错误:android-apt插件与Android Gradle插件不兼容。 Please use 'annotationProcessor' configuration instead. 请改为使用“ annotationProcessor”配置。

Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. 警告:配置“编译”已过时,已被“实现”和“ api”替换。 It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html 它将在2018年底删除。有关更多信息,请参见: http : //d.android.com/r/tools/update-dependency-configurations.html

在此处输入图片说明

在此处输入图片说明

I already made changes with Implementation and AnnotationProcessor in app level gradle file. 我已经在应用程序级别gradle文件中使用Implementation和AnnotationProcessor进行了更改。 How can I use realm 1.2.0 version with latest android tools gradle? 如何将Realm 1.2.0版本与最新的android工具gradle一起使用?

Realm 1.2.0 won't work anymore with AS 3.0+. Realm 1.2.0在AS 3.0+中将不再起作用。 It was Realm 2.2.0 that added support for annotationProcessor configuration, which is now mandatory to use. Realm 2.2.0增加了对annotationProcessor配置的支持,现在必须使用该配置。 But Realm 5.1.0 is out there, so if this is a new project, there is no reason to use Realm 1.2.0 instead of 5.1.0 但是Realm 5.1.0已经存在,因此,如果这是一个新项目,则没有理由使用Realm 1.2.0而不是5.1.0。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM