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
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.
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.)
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)
Of course, you can also choose the emulator, as long as the settings are the same twice.