The termination of an existing connection was forced by the remote host

0

So, guys, I've been busting my head with this problem in Android Studio:

1-Ialreadygaverestartinadb:
link

2 - I have already updated the device drive and disabled the Android debug mode and developer mode (and reactivated again): link

3 - I already bought another USB cable;

And so far nothing!

For this I am using:
- Android Studio 3.1.4; Home - Samsung SM-J320M;

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

    
asked by anonymous 13.10.2018 / 17:10

1 answer

0

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

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

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

Your everything goes as expected, a message will appear informing you that the ADB is connected to the device (IP). Ready! It is now available in the list of devices. Give adb devices or go to Android Studio and your device will be listed.

Link to original response: link

    
14.10.2018 / 14:52