Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradle stuck at :app:mergeDebugResources after opening realm file using realm browser

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?

like image 499
Mike Axle Avatar asked Jan 03 '23 21:01

Mike Axle


1 Answers

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

like image 82
Mike Axle Avatar answered Jan 21 '23 15:01

Mike Axle