Android Studio:java.io.IOException:远程主机强行关闭了现有连接 [英] Android Studio: java.io.IOException: An existing connection was forcibly closed by the remote host

查看:553
本文介绍了Android Studio:java.io.IOException:远程主机强行关闭了现有连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了许多帖子来解决此问题。没有一个对我有用。



错误:

 目标设备: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:现有连接被远程主机

我在下面尝试过


  1. 杀死并启动adb

  2. 使Android Studio无效并重新启动

  3. 在任务栏中删除了adb进程

  4. 重新启动了设备和PC

  5. 重新启动Studio,清理和重建

  6. 任务栏只有一个adb.exe

  7. 从设备管理器更新了驱动程序

正在运行的另一台设备。但是以前两个设备对我来说都工作正常。

 目标设备: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
成功

已编辑:

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

  1. Kill and start adb
  2. Invalidate and restart android studio
  3. Removed adb process in the taskbar
  4. Restarted the device and pc
  5. Restarted studio, clean and rebuild
  6. Taskbar have only one adb.exe
  7. 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:远程主机强行关闭了现有连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆