Reputation: 611
I am trying to install my project on my device but I am getting the following error:
This is the error:
java.io.IOException: An existing connection was forcibly closed by the remote host
Error while Installing APK
Please help me with this and also could anyone tell me about R in java file
Upvotes: 5
Views: 5908
Reputation: 127
What I had to do was to disabling and enabling USB debugging but with also revoking computer autorisations and then re-enabling. I hope it helps someone since I struggled a lot.
Upvotes: 0
Reputation: 3131
If its a real device, In my case disabling and enabling the usb debugging option worked. Killing and Starting the adb server didn't help.
Upvotes: 0
Reputation: 883
run->cmd->your_android_sdk_path->platform-tools>
Then write the below commands.
adb kill-server - To kill the server forcefully
adb start-server - To start the server
UPDATED:
F:\android-sdk-windows latest\platform-tools>adb kill-server
F:\android-sdk-windows latest\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Upvotes: 1