RealmException - 'Paper' has a primary key, use 'createObject(Class, Object)' instead

    --------- beginning of crash
04-20 11:59:46.918 7408-7408/quizcounter.geeks.compete.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
    Process: quizcounter.geeks.compete.myapplication, PID: 7408
    io.realm.exceptions.RealmException: 'Paper' has a primary key, use 'createObject(Class<E>, Object)' instead.
        at io.realm.Realm.createObjectInternal(Realm.java:998)
        at io.realm.Realm.createObject(Realm.java:977)
        at quizcounter.geeks.compete.myapplication.SplashScreenActivity$setAllPaperDataToDB$1.onDataChange(SplashScreenActivity.java:531)
        at com.google.firebase.database.Query$1.onDataChange(com.google.firebase:firebase-database@@16.1.0:183)
        at com.google.firebase.database.core.ValueEventRegistration.fireEvent(com.google.firebase:firebase-database@@16.1.0:75)
        at com.google.firebase.database.core.view.DataEvent.fire(com.google.firebase:firebase-database@@16.1.0:63)
        at com.google.firebase.database.core.view.EventRaiser$1.run(com.google.firebase:firebase-database@@16.1.0:55)
        at android.os.Handler.handleCallback(Handler.java:742)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:157)
        at android.app.ActivityThread.main(ActivityThread.java:5603)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)

No comments:

Post a Comment

Popular Posts