Error: ADB exited with exit code 1 Performing Streamed Install adb: failed to install D:\svn\app\sm

Using vscode allows problems with flutter projects: Error: ADB exited with exit code 1 Performing Streamed Install adb: failed to install

提示:搭建好vscode的Flutter环境后,我运行了一个flutter项目,flutter run 后报错:


报错:Error: ADB exited with exit code 1 Performing Streamed Install adb: failed to install D:\svn\app\smis\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Install

insert image description here

solution:

1. My project uses a real device for joint debugging. It is necessary to turn on the developer mode of the mobile phone, allow usb debugging, and allow usb installation;
2. Then, when flutter run is running in vscode, select my real device.

insert image description here
Click Modify, this location of vscode is the real machine you want to debug. (After clicking, the following picture will appear. Some of them can be debugged, or you can create a new emulator.)
insert image description here

Then run flutter run (if you have multiple environments to choose from at this time, you need to choose one, I chose the real machine environment)
insert image description here
Of course, you can also choose the emulator, as long as the settings are the same twice.

Guess you like

Origin blog.csdn.net/qq_41117240/article/details/123893201