Closed jasondp closed 6 years ago
This is an issue that would be better suited in realm-java... though I would ask if you could more clearly state the problem and what you were expecting
//build gradle (app) apply plugin: 'com.android.application' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android' apply plugin: 'realm-android' apply plugin: 'kotlin-android-extensions'
realm { kotlinExtensionsEnabled = true } //build gradle (project) classpath "io.realm:realm-gradle-plugin:5.9.0"
@RealmClass open class ProfileDataBean :RealmObject() { @Required @PrimaryKey @SerializedName("email") @Expose open var email: String = "" @SerializedName("id") @Expose open var id: Int? = null }
java.lang.IllegalArgumentException: User is not part of the schema for this Realm 01-12 14:25:45.327 30017-30017/com.dayton.drone W/System.err: at io.realm.internal.modules.CompositeMediator.getMediator(CompositeMediator.java:169) 01-12 14:25:55.864 30017-30017/com.dayton.drone W/System.err: at io.realm.internal.modules.CompositeMediator.getSimpleClassNameImpl(CompositeMediator.java:87) 01-12 14:26:36.823 30017-30017/com.dayton.drone W/System.err: at io.realm.internal.RealmProxyMediator.getSimpleClassName(RealmProxyMediator.java:79) 01-12 14:26:36.825 30017-30017/com.dayton.drone W/System.err: at io.realm.RealmSchema.getTable(RealmSchema.java:186) 01-12 14:26:36.828 30017-30017/com.dayton.drone W/System.err: at io.realm.RealmSchema.getSchemaForClass(RealmSchema.java:209) 01-12 14:26:36.830 30017-30017/com.dayton.drone W/System.err: at io.realm.RealmQuery.(RealmQuery.java:141)
01-12 14:26:36.831 30017-30017/com.dayton.drone W/System.err: at io.realm.RealmQuery.createQuery(RealmQuery.java:80)
01-12 14:26:36.833 30017-30017/com.dayton.drone W/System.err: at io.realm.Realm.where(Realm.java:1332)
01-12 14:26:36.835 30017-30017/com.dayton.drone W/System.err: at net.medcorp.models.helper.UserDatabaseHelper.getLoginUser(UserDatabaseHelper.java:62)
01-12 14:26:36.837 30017-30017/com.dayton.drone W/System.err: at com.dayton.drone.application.ApplicationModel.onCreate(ApplicationModel.java:69)
01-12 14:26:36.839 30017-30017/com.dayton.drone W/System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
01-12 14:26:36.841 30017-30017/com.dayton.drone W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5505)
01-12 14:26:36.843 30017-30017/com.dayton.drone W/System.err: at android.app.ActivityThread.-wrap2(ActivityThread.java)
01-12 14:26:36.845 30017-30017/com.dayton.drone W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1602)
01-12 14:26:36.847 30017-30017/com.dayton.drone W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
01-12 14:26:36.849 30017-30017/com.dayton.drone W/System.err: at android.os.Looper.loop(Looper.java:163)
01-12 14:26:36.850 30017-30017/com.dayton.drone W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6337)
01-12 14:26:36.851 30017-30017/com.dayton.drone W/System.err: at java.lang.reflect.Method.invoke(Native Method)
01-12 14:26:36.852 30017-30017/com.dayton.drone W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
01-12 14:26:36.853 30017-30017/com.dayton.drone W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
This is my model
public class User extends RealmObject {
}