I am working with flutter currently and everything was fine suddenly when I uninstalled the app from the device and rerun flutter run from the terminal it's suddenly not able to install the apk into a real device. It's not even giving any error just getting stopped at the installation process.
What led to this problem
I was working with sqflite and everything was fine. So I had to change the schema and added another table which was failing. Searching on SO answerer suggested to uninstall the app then reinstall it (was accepted answer). So I did that but after every time when I am running flutter run it is not installing the APK.
I am running Mac Os High Sierra 10.13.6 and running flutter doctor is giving everything right as I said it was working fine but not reinstalling after uninstalling.
To do this, go into your device or emulator: Settings > Developer options , Change the buffer size to a higher number. Then run flutter run -v again.
Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device. In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device.
Insufficient Storage- If your Android device is too full, it causes the package installer to malfunction, leading to the 'App not Installed' pop-up. Even a corrupted Internal Storage Card or an SD card which is not mounted properly may lead to clogged storage and thus give you the App not installed error message.
Uninstalling the app from the home page would cause subsequent flutter run
commands to hang at the installing stage.
Running with flutter run -v
showed that it installed successfully but the activity would not run when adb tried to run it.
The error message was class 3 ${packageName}/${packagName}.MainActivity
not found.
Changing the android app package name would cause it to work again until I uninstalled it manually from the phone.
flutter clean
didn't work adb shell pm list package ${packageName}
didn't show it in the list so there was nothing to clean through thereadb uninstall ${packageName}
and it showed 'Success'. Now subsequent flutter runs work perfectly.
It seems uninstalling apps from the home screen does leave some intent or activities in some cache somewhere.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With