Android studio 同步期间出错:现有连接被远程主机强行关闭

Android studio Error during Sync: An existing connection was forcibly closed by the remote host

我已经使用通过 USB 连接的物理 Samsung pad 调试了几个月,现在我无法在设备上加载应用程序进行调试。我昨天重新启动了一切,它一直工作到今天下午!我总是遇到同样的错误。 ADB 似乎在端口 5037 上 运行。

我对开发环境的错误感到失望,感觉就像回到 Win3 时代一样,我在与环境而不是应用程序作斗争。任何建议将不胜感激...

3:11 PM Gradle build finished in 2s 40ms
3:11 PM Error during Sync: An existing connection was forcibly closed by the remote host
3:11 PM Session 'app': Error Installing APK

我正在使用 USB 调试。我已经尝试了所有我能在 SO 上找到的东西,但没有任何效果:

1) Rebooted both laptop and device many times
2) Deleted app from device
3) Manually updated the SDK to 8.1.0 (auto update fails with file size error)
4) Unplugged and tried a different USB port
5) Updated the Samsung Android ADB interface from Win7 device manager
6) Killed adb via task manager and SDK kill-server and start-server
7) Turned USB / Developer mode off and on again
8) Deleted the device from Win Device Manager; re-scanned; updated driver software

我现在可以随意实现它,而且它似乎是在设备进入睡眠模式时发生的。所以我正在调试并且一切正常并且出现了问题。我通过 Android Studio 停止应用程序并重新启动 Samsung pad。在那之后我得到了时髦的临时设备出现并且 ADB 不会安装。修复方法是拔下 USB 电缆。等待大约 1 分钟,然后重新插入。临时设备不见了,垫子出现了。一切正常。

我有这个错误。 系统内存不足。我刚刚关闭了一些程序(Chrome 使用了 1GB)并重新启动了 Android Studio。 也尝试删除文件夹 "build" 和 "app/build".