android中的领域得到错误:
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lio/realm/Realm$1$1;
配置:
apply plugin: 'realm-android'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "io.realm:realm-gradle-plugin:4.2.0"
}
}
realm {
syncEnabled = true
}
compile 'io.realm:realm-android:0.87.5'
annotationProcessor 'io.realm:realm-android:0.87.5'
我试过干净的项目重建项目没有发生
您可以像这样轻松解决此问题:
apply plugin: 'realm-android'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "io.realm:realm-gradle-plugin:4.2.0"
}
}
realm {
syncEnabled = true
}
//compile 'io.realm:realm-android:0.87.5' // <-- removed
//annotationProcessor 'io.realm:realm-android:0.87.5' // <-- removed
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句