Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
RealmMigrationNeededException on fresh install after model change #1856
I'm working on integrating Realm in my Android application. My model changes from time-to-time during development, so I expect the
I can fix it by:
Shouldn't these be removed when I uninstall the app? I suspect this isn't a Realm issue but rather something to do with Android or adb - however I haven't had this issue with say, ORMLite. Any ideas?
Edit: I actually get this exception even if I don't change the model at all.
Does this help?
5 months later I've finally figured this out as I check things off my pre-release TODO list.
This was caused by Android 6.0 auto-backup. I had to disable this for my Realm files (I'm using the default configuration):
Adam, I owe you a beer. I was pulling my hair out and then came across your article: http://speakman.net.nz/blog/2016/04/21/handling-realmmigrationneededexception-on-a-fresh-installation-on-android/
Thank you very much!