My app comes with a pre-populated realm file which is stored in res/raw directory. Gradle was working just fine until i decided to open the realm file using realm browser. Now gradle gets stuck at :app:mergeDebugResources.
Usually I would edit the realm file from another directory outside the project directory and copy it over to res/raw directory when I'm done. But this time I opened the realm file stored in the res/raw directory in the project directory.
This is the second time this has happened to me. The first time I had to completely restart the project from scratch and copy code over. Downloading an older commit from GitHub didn't work either.
Has anyone else experienced this? Any fixes?
Github saved the day. I completely deleted the local project folder and cloned my last commit from GitHub. Gradle re-built everything properly after that.
I had to make sure those temporary files created when you open a realm file with realm browser(database_name.realm.lock and database_name.realm.management/) were deleted from the res/raw directory before opening the project in android studio.
It seems the temporary files cause this problem. To anybody not using versioning, please do. its a life saver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With