Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app安装后报错 #14

Closed
ldpGitHub opened this issue Mar 11, 2019 · 2 comments
Closed

app安装后报错 #14

ldpGitHub opened this issue Mar 11, 2019 · 2 comments

Comments

@ldpGitHub
Copy link

企业微信截图_15522975839150

@ldpGitHub
Copy link
Author

还是崩溃啊,一样的报错

@yangchong211
Copy link
Owner

报错日志: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'

已经解决!

This was referenced Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants