Skip to content Skip to sidebar Skip to footer

Android Realm.io: Row/object Is No Longer Valid

This is my delete function and it does find the workday1 object: public static void delete(Context context, Workday workday) { Realm realm = getRealm(context); realm.beginT

Solution 1:

You are trying to remove an object you have not committed to the Realm yet.

In this particular case, if for some reason you don't want to commit the object anymore, you can simply cancel the transaction.

Solution 2:

In my case, the problem was that the same Object I was deleting was in an Adapter. After I made the Adapter extend RealmBaseAdapter the problem stopped.

Post a Comment for "Android Realm.io: Row/object Is No Longer Valid"