“Object” is not part of the schema for this Realm

后端 未结 1 1355
面向向阳花
面向向阳花 2020-12-21 03:12

When I call the realm.where(MessageEventModel::class.java).findAll()

it throws excepiton: this is error

java.lang.IllegalArgumentExcept         


        
相关标签:
1条回答
  • 2020-12-21 03:55

    The issue where in gradle file.The problem where just an ordering rules of applying plugins, thanks to the @EpicPandaForce's comment, the problem has been solved, I'm writing answer, for helping others, if they miss the commented answer from @EpicPandaForce

    I changed the ordering of

    apply plugin: 'com.android.application'
    apply plugin: 'realm-android'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'
    

    to

    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'
    apply plugin: 'realm-android'
    

    That's all, now everything works fine

    0 讨论(0)
提交回复
热议问题