Flutter: Can’t install app on Android device (Kindle Fire tablet)

In one of the crazier bugs I’ve seen, I got to a point where I had my Flutter app in good shape, and I had been testing it on an Android device. So as one last test I wanted to make sure I deleted the app from the Android device — a Kindle Fire tablet — so I could then do a complete reinstall of my app so I could give it one more quick test.

And then it never installed properly.

The app wouldn’t install on the device

It seemed like the app started to install on my Android device, but then it wouldn’t. I tried all sorts of different flutter run commands, but the app just wouldn’t install. It seemed a little like it was hung up (stalled), but it also seemed a little like it also finished installing and was sitting there waiting for me. (At the moment I don’t remember the exact messages the Flutter build process was showing.)

So, assuming that there was some sort of communication error between Flutter and the Android/Kindle tablet, I rebooted the tablet, rebooted my computer, and ... nothing. The app still wouldn’t finish installing. This went on for almost an hour.

Then I got the idea to make sure the Flutter app would install properly on an emulator/simulator. So I confirmed that indeed, it would install on an iOS/iPhone emulator as well as an Android emulator. So I decided the problem must be with the tablet.

App is “not installed for this user”

Long story short, apparently on Android, when you uninstall an app, it can get in a state where it says that the app is “not installed for this user.” At the moment I don’t understand the logic behind this, because I’m the only user on the tablet, and because it’s a Kindle Fire tablet I’m the only one who has ever signed into it. So when I uninstalled the app, I assumed it was really uninstalled.

Root cause of my problem: It turns out the app wasn’t completely uninstalled.

So the solution is that you have to go into your Android/Kindle settings, search for “app,” then:

  • Go to App Info
  • Tap something like “See all 50 apps” you have installed
  • Be amazed and surprised when you see that your app is still installed, but “not installed for this user”
  • Then you’ll have to really uninstall your app

I did this by tapping the dot-dot-dot icon in the upper-right corner on the screen where I was looking at my app, and selecting “Uninstall for all users.”

That actually completely uninstalled my Android app, and then I was able to reinstall it using flutter run.

Again, I have no idea atm why it works this way, but I can confirm that this approach works. After I completely uninstalled my Android app, I was able to reinstall it and work with it as usual. If you have run into this problem, I hope these notes are helpful.