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

273
June 15, 2017, at 12:36 PM

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?

Answer 1

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

READ ALSO
Downloading a file over HTTP using urllib.resquest

Downloading a file over HTTP using urllib.resquest

I'm trying to download a file from a url using this python 36 code:

271
Can i create a LinearLayout and an EditText in a background thread?

Can i create a LinearLayout and an EditText in a background thread?

I want to create (but only create, not manipulate) a LinearLayout and an EditText in a background thread (so not in the UI thread)

182
Recycler GridView list with sticky header shows two headers

Recycler GridView list with sticky header shows two headers

Just using sticky-headers-recyclerview to show simple GridView list with sticky headers, but I get two headers, instead of one:

213
Not able to access a GraphView's LocationOnScreen/Window in Android in onCreate or onStart

Not able to access a GraphView's LocationOnScreen/Window in Android in onCreate or onStart

Inserting the following block of code crashes the program on launch

169