[SOLVED] Debugging the application in Android Studio.


nullptroma

Members
Jun 21, 2023
2
3
When I develop an app, sometimes I run it through Wi-ADB on the phone, it installs and runs fine. But only once. If I try to restart the app from Android Studio, it will no longer launch via ADB or the app launcher on the phone.
When I try to start the application window appears and immediately disappears, no logs are written, no errors, it just closes.
If I reinstall the app or clear the cache it starts working. If I turn off the application using MIUI tools (I just flicked it from the recent ones, instead of turning it off via Android Studio), it also works.
The problem is not in my project: this is observed even on an empty Android Studio project.
If I run and turn off the app only on the phone (without Android Studio involved) everything works as it should.
I tried turning off MIUI Optimization, it didn't help, what else can I try?