Android Studio 3.2 Gradle3.2使用Realm出错
Android Studio3.2 Gradle3.2 使用Realm,结果gradle3.2出错了。
正常配置环境
build.gradle(project)
buildscript { repositories { jcenter() } dependencies { classpath "io.realm:realm-gradle-plugin:3.0.0" } }
build.gradle(module)
apply plugin: 'realm-android'
报错:
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
从网上查资料得到解决办法是:
build.gradle(project)
classpath "io.realm:realm-transformer:2.1.1"
build.gradle(module)
import io.realm.transformer.RealmTransformer android.registerTransform(new RealmTransformer()) dependencies { implementation "io.realm:realm-annotations:2.1.1" implementation "io.realm:realm-android-library:2.1.1" annotationProcessor "io.realm:realm-annotations-processor:2.1.1"}
相关推荐
likesyour 2020-08-01
likesyour 2020-06-07
ErixHao 2020-06-03
GDreams0 2020-06-01
nullcy 2020-04-25
visionzheng 2020-04-20
ganjing 2020-02-16
Mr丶Yang 2020-01-23
luckyxl0 2019-12-24
GDreams0 2019-12-22
Julywhj 2019-12-14
likesyour 2019-12-06
ganjing 2019-11-09
AndrewYuan 2019-11-09
AndrewYuan 2019-11-06
longdan0 2017-07-27
Cshnuscw 2015-06-24
tulunta 2015-06-24
子云 2016-03-23