我是android studio和flutter的新手。我意识到这个问题的提出和回答,但不幸的是,它对我来说是稳定的。当我运行flutter项目时,android studio的run框中出现以下错误。
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install D:\project\Flutter\flutter_app9\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_FAILED_VERIFICATION_FAILURE]
Error launching application on G011A.
我在寻找更多的时间,并遵循下面所有当前的步骤。
1)flutter clean
2)adb kill and then start in terminal or CMD
3)download platform-tools and replaced it by the old one.
4)set variable related to abd in Path
5)download Gradle on reallocated it and android studio
6)change my emulator from to memu
7)Disable Antivirus and firewall
8)upgrade my flutter by newer version of powershell
总而言之,这个问题让我精疲力尽,此外,在android studio的事件框中,有一些提示告诉我关于abd存在的一个棘手问题,这将在下面提到。
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Cannot reach ADB server, attempting to reconnect.
12:32 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:34 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:34 PM Cannot reach ADB server, attempting to reconnect.
12:34 PM adb server version (31) doesn't match this client (41); killing...
12:34 PM * daemon started successfully
12:34 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:34 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Unable to open connection to ADB server: java.io.IOException: Can't find adb server on port 5037, IPv4 attempt: Connection refused: connect, IPv6 attempt: Connection refused: connect
12:35 PM Failed to start monitoring 127.0.0.1:21503
12:35 PM adb server version (31) doesn't match this client (41); killing...
12:35 PM * daemon started successfully
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Failed to start monitoring 127.0.0.1:21503
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Sending jdwp tracking request failed!
12:35 PM Failed to start monitoring 127.0.0.1:21503
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Failed to start monitoring 127.0.0.1:21503
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:35 PM Cannot reach ADB server, attempting to reconnect.
12:35 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:36 PM Cannot reach ADB server, attempting to reconnect.
12:36 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:36 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:36 PM Cannot reach ADB server, attempting to reconnect.
12:36 PM adb server version (31) doesn't match this client (41); killing...
12:36 PM * daemon started successfully
12:36 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:36 PM Cannot reach ADB server, attempting to reconnect.
12:36 PM adb server version (31) doesn't match this client (41); killing...
12:36 PM * daemon started successfully
发布于 2021-03-04 05:33:40
在经历了我提到的问题之后,我可以找到我的question.Indeed的解决方案,两个原因导致我的项目失败,我想用他们的答案来描述这两个原因。
第一个问题:
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install D:\project\Flutter\flutter_app9\build\app\outputs\flutter-apk\app.apk: Failure [INSTALL_FAILED_VERIFICATION_FAILURE]
Error launching application on G011A.
第一个问题的答案:
它源于android的特权政策,因为google play中有一个安全漏洞,可以限制未经授权的安装。显然,我登录google play并在设置中关闭了保护,导致了这一挑战的解决。最后,android studio和模拟器之间的同步正确完成。
第二个问题:
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
12:31 PM Adb connection Error:An existing connection was forcibly closed by the remote host
12:31 PM Sending Tracking request failed!
您必须在pc中浏览所有的adb文件,并且它们应该具有相同的版本。例如,最突出的一个就是你的模拟器中的adb,它带来了大量的问题。因此,通过在SDK的platform-tools文件夹中将它们全部替换为新版本,幸运的是,我拯救了第一个。
https://stackoverflow.com/questions/66436862
复制相似问题