当我将“com.android.tools.build:gradle:3.1.2”与“io.realm:realm-gradle-plugin:5.1.0”一起使用时,它工作正常,但是我想使用 Realm 版本1.2.0 。现在,它正在发生冲突并给出如下错误:
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
我已经使用应用程序级别gradle文件中的Implementation和AnnotationProcessor进行了更改。如何使用最新的Android工具Gradle使用Realm 1.2.0版本?
最佳答案
Realm 1.2.0在AS 3.0+中将不再起作用。 Realm 2.2.0添加了对annotationProcessor
配置的支持,现在必须使用该配置。但是Realm 5.1.0已经存在,因此,如果这是一个新项目,则没有理由使用Realm 1.2.0而不是5.1.0。
关于android - Gradle插件版本与Real Gradle版本Android Studio冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50503266/