PS D:first_appflutter_application_1> flutter run
Launching libmain.dart on M2102J20SG in debug mode...
Running Gradle task 'assembleDebug'... 9.8s
√ Built buildappoutputsflutter-apkapp-debug.apk.
Installing buildappoutputsflutter-apkapp-debug.apk... 8.1s
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install D:first_appflutter_application_1buildappoutputsflutter-apkapp-debug.apk: Failure
[INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]
Error launching application on M2102J20SG.
i just dont know please tell me how to fix it.
2
Answers
Turn off "MIUI optimization" and Restart
Turn On "USB Debugging"
Turn On "Install via USB"
When you debugging app for 1st time Phone will ask your permission to install app, so keep an eye on it.
When prompted allow it install an app.
You only have to do it once, but it will ask again when you uninstall an app from phone.