Closed ldpGitHub closed 5 years ago
还是崩溃啊,一样的报错
报错日志:RealmException: 'class com.ns.yc.lifehelper.model.cache.CacheHomeNews' is not part of the schema for this Realm. 报错原因:realm与kotlin配置问题,组件化模式下 错误配置【参考方案:https://github.com/realm/realm-java/issues/3139】
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
正确配置【注意:realm-android要在kotlin配置之后】
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'realm-android'
已经解决!