Android 域不是具有kotlin的架构的一部分

Android 域不是具有kotlin的架构的一部分,android,realm,Android,Realm,致命异常:主 java.lang.IllegalArgumentException: student_relam_pojo is not part of the schema for this Realm at io.realm.internal.modules.CompositeMediator.getMediator(CompositeMediator.java:118) at io.realm.internal.modules.CompositeMediator

致命异常:主

    java.lang.IllegalArgumentException:    
     student_relam_pojo is not part of the schema for this Realm  at io.realm.internal.modules.CompositeMediator.getMediator(CompositeMediator.java:118) at io.realm.internal.modules.CompositeMediator.getTableName(CompositeMediator.java:71) at io.realm.Realm.getTable(Realm.java:327)
at io.realm.Realm.createObject(Realm.java:1085)at example.com.kotlinexamplebydimple.RealmActivity$onCreate$1.onClick(RealmActivity.kt:24)
val realm=realm.getInstance(this@RealmActivity)

学生(u realm)(u pojo)

public  open class student_relam_pojo() : RealmObject()
{
    public open var nm : String ?= null
    public open  var pass : String ?= null
}
1.)为了可靠地使用KAPT,您应该至少使用Realm 2.3.0

2.)您的插件顺序应如下所示:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'
3.)如果使用库模块中定义的RealmObjects,则需要使用
@RealmModule
s在RealmConfiguration中显式指定它们,请参阅


4.)您可能已经添加了此类,但没有为其提供迁移。考虑提供迁移,或者设置<代码> DeleTeFieldEnguleNeDeD()/<代码> ./P>我们需要知道以下内容:1).GooDelphi插件3)是库模块或应用程序中的RealMuffes。
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'