This error happens when i try to run the app on the simulator:
It asks if it can uninstall the current application but there is no application installed on the simulator. If i click ok, just fails.
I try to invalidate cache and restart, to reboot the pc, to create a new simulator, to update Android studio, all failed with this error.
My current android studio version is 3.2.1.
Solved by changing app version from 29 to 30. Doesn't make much sense but the error is gone.
Maybe, somehow, has to do with a previous build of a signed APK, version 29. It start to happen just after.