javaandroiddebuggingxiaomimiui

Accidentally pressed don't allow install app and remember - Android Studio


When I ran my app in Android studio, with my personal device, a notification was shown, and I accidentally pressed "remember action", and then pressed "don't allow". Now each time I try to run the app, I obtain an Android error, which says:

19:35 Session 'app': Installation did not succeed. The application could not be installed: INSTALL_FAILED_USER_RESTRICTED Retry

I've tried reconnecting the USB cable, however it didn't work.

Does someone know how to undo this?


Solution

    1. Go to developer configuration
    2. Turn Off Allow debug
    3. Turn On Allow debug
    4. Connect again

    It'll show you the alert again :D