Remove room database on app uninstall // Android Dev Diary

The problem:

Installing on an Android device that has an old version of an app I’m developing triggers an error:

Room Database Migration: java.lang.IllegalStateException: Migration didn't properly handle

Problem persists despite uninstalling the Android app and deleting all app data.

The solution:

Very simple. I set allowBackup to false in my AndroidManifest.xml file like so:

android:allowBackup="false"

Then I reinstalled the app on the Android device. Error was still triggered on first install, but after one more round of uninstall and reinstall, the error finally went away!

Side Note / Quick Life Update:

I have been working on an app, with me as its first user. I tentatively call it “bodymonitor”. It should let me log foods I ate, meds/supplements I took, and body sensations. My brain does not do a good job of monitoring these things so I shall get an app to help me do it. There are existing apps out there that do more or less the same thing, but I want one that caters to my specific needs. Doesn’t hurt to practice Android app development as I make the app, too!

This weekend I’ll undergo endoscopy again, but this time it’s called a “flexible nasopharyngolaryngoscopy” which will pass through the nose instead of the mouth, to be done under local anesthesia. From the sound of it I don’t expect to be put to sleep, which makes me less anxious, but still anxious. XD It’s gonna be done because of my throat issues.

Related Posts:

Posts that may be related to "Remove room database on app uninstall // Android Dev Diary":

Catzie

An odd human being who happens to have a variety of ever-changing interests, but right now they are programming, making up silly song/rap lyrics, K-pop, drawing, creating unique dessert/drink flavors, obsessing about finding out how some things works, automation, anime, video games... Ran online dessert shops Cookies PH and Catzie's Cakery in her past life.

Leave a Reply

Your email address will not be published. Required fields are marked *