问题描述
我阅读了许多帖子来解决此问题。没有一个对我有用。
错误:
目标设备:lenovo-lenovo_a6000-89a70dc9
安装APK:C:\Users\Nikhil\AndroidStudioProjects\ProfitKey\app\build\outputs\apk\app-debug。 apk
将文件上传到:/data/local/tmp/helix.profitkey.hotelapp
java.io.IOException:现有连接被远程主机
$ c $强制关闭c>
我在下面尝试过
- 杀死并启动adb
- 使Android Studio无效并重新启动
- 在任务栏中删除了adb进程
- 重新启动了设备和PC
- 重新启动Studio,清理和重建
- 任务栏只有一个adb.exe
- 从设备管理器更新了驱动程序
正在运行的另一台设备。但是以前两个设备对我来说都工作正常。
目标设备:motorola-xt1022-ZX1B33PRVP
安装APK:C: \用户\Nikhil\AndroidStudioProjects\ProfitKey\app\build\输出\apk\app-debug.apk
将文件上传至:/data/local/tmp/helix.profitkey。 hotelapp
安装helix.profitkey.hotelapp
设备外壳命令:pm install -r /data/local/tmp/helix.profitkey.hotelapp
pkg:/ data / local / tmp / helix.profitkey.hotelapp
成功
已编辑: 我尝试了两台联想A6000。一个正在工作,而另一个则不工作。然后,摩托(Moto)正在工作,而三星银河系则不在工作。每当我杀死并启动adb时。任务管理器首先创建两个adb,几秒钟后一个被隐藏。这是个问题吗?但是某些设备仍然可以正常工作。
adb在被命令杀死后或在打开Android Studio的情况下从任务管理器中自动启动。
现在适用于所有设备。只是我在PC上卸载了移动设备的驱动程序,并更改了与该设备连接的端口。我认为PC上的端口存在一些问题。经过长期的研究,它被一件事固定了。对某人可能会有帮助。
I read many posts to fix this problem. None worked for me.
Error:
Target device: lenovo-lenovo_a6000-89a70dc9
Installing APK: C:\Users\Nikhil\AndroidStudioProjects\ProfitKey\app\build\outputs\apk\app-debug.apk
Uploading file to: /data/local/tmp/helix.profitkey.hotelapp
java.io.IOException: An existing connection was forcibly closed by the remote host
I tried below
- Kill and start adb
- Invalidate and restart android studio
- Removed adb process in the taskbar
- Restarted the device and pc
- Restarted studio, clean and rebuild
- Taskbar have only one adb.exe
- Updated the driver from device manager
Another device it is working. But previously both device worked fine for me.
Target device: motorola-xt1022-ZX1B33PRVP
Installing APK: C:\Users\Nikhil\AndroidStudioProjects\ProfitKey\app\build\outputs\apk\app-debug.apk
Uploading file to: /data/local/tmp/helix.profitkey.hotelapp
Installing helix.profitkey.hotelapp
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/helix.profitkey.hotelapp"
pkg: /data/local/tmp/helix.profitkey.hotelapp
Success
Edited:
I tried with two lenovo A6000. One is working and another is not working. Then, Moto is working and samsung galaxy is not working. Whenever I am killing and starting the adb. The task manager creating two adb first and after few seconds one was hiding. Was this a problem? But still some devices working fine.
adb starts automatically after killing by command or from the task manager if android studio is opened.
Now working for all the devices. Just I uninstalled the driver of mobile in PC and changed the port to connect with that device. I think some problem with the port in my PC. After long research it fixed by a small thing. It might be helpful to someone.
这篇关于Android Studio:java.io.IOException:远程主机强行关闭了现有连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!