Forced cancellation of an existing connection by the remote host

Asked

Viewed 20,811 times

2

So guys, I’ve been breaking my head with this problem in Android Studio:

inserir a descrição da imagem aqui

1 - I’ve already started adb:
https://stackoverflow.com/questions/36029809/android-studio-java-io-ioexception-an-existing-connection-was-forcibly-closed

2 - I already updated the device drive and disabled the android debug mode and developer mode (and reactivated again):
https://stackoverflow.com/questions/39050538/android-studio-fail-to-install-app-on-device

3 - I already bought another USB cable;

And so far nothing!

That’s what I’m using it for:
- Android Studio 3.1.4;
- Samsung SM-J320M;

Note: when I try to run the app and this error happens, in the Deploy Device Selection window (Select Deployment Target), appears that the device is OFFLINE, but in no time it is realized that it has been disconnected from the USB. How can I fix this?

1 answer

2


After many searches, I finally solved my problem based on a response from the Unity forum.

This happens due to the instability of the device in relation to the USB connection. So, in this case, the best thing to do is to connect the ADB to the device via wifi. For such:

1 - Open the cmd keystroke Win + R, typing cmd and giving Enter
2 - Restart on port 555 with the following command - adb tcpip 5555
3 - With your device’s IP address in hand type adb connect ip.do.seu.dispositivo (your smartphone must be on the same local network)

If everything goes as expected, a message will be displayed stating that the ADB is connected to the device (IP). Ready! Now it is available in the list of Vices. Give a adb devices or go to the Android Studio and your device will be listed.

Link to the original answer: http://answers.unity.com/answers/1354067/view.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.