Moving Realm entities to another Package

Viewed 77

I am doing a big refactor in my Android app and I am moving the RealmObjects to another package. After I move the packages, The Realm database is not able to find those entities and throw an exception saying that I am trying to add new entities to the database. I need to do a migration in this case? How can I move those entities without problem? I read that the package did not matter, only the name.

1 Answers

Please try with delete 'build' (See attached screenshot) directory and restart android studio with

File->invalidate cache and restart->Invalidate and restart

Delete 'build' directory

Related