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

标签 android gradle realm

当我将“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


enter image description here
enter image description here
我已经使用应用程序级别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/

相关文章:

android - 更新Android Studio RC 2后出现Gradle Build错误-android-sdk-linux'不存在

android - 从@aar、gradle 依赖项中排除包/类

ios - `indexOf` 抛出 "Object type does not match RLMResults"异常

swift - Realm 加密 - 附带预填充数据时如何工作?

java - Android 应用程序与 Derby 中的远程数据库的连接

java - Json 可以保存对象引用还是只复制值?

找不到 Android Gradle 4.1-rc-1

android - 使用 Stripe 支付方式时 Realm 错误

android - Oreo TYPE_APPLICATION_OVERLAY,无法点击显示的任何部分

android - 错误消息 'java.net.SocketException: socket failed: EACCES (Permission denied)'