Remove room database on app uninstall // Android Dev Diary

Written by

on

in

, ,

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

About the author:

Catzie Avatar

The homo sapiens behind these blog posts is “Catzie“

Explore my top blog posts:

Comments

Leave a Reply

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