0

I'm beginner in Android development. Sorry if my question is silly.

The problem is every time i run app in android studio on real device - i got following error

10/03 12:09:22: Launching app
$ adb push C:\Users\user\AndroidStudioProjects\P004_BasicViews\app\build\outputs\apk\app-debug.apk /data/local/tmp/ru.starandroid.p004_basicviews
java.io.IOException: An existing connection was forcibly closed by the remote host 

Error while Installing APK

I tried finding solutions on the Internet. All they recommended - I did, but it didn't work:

ADB does see the device. ("adb devices" - shows it)
USB debugging is activated on device.
I tried to change from MTP to PTP protocol.

I use the latest Android studio 2.2.
Windows 7 x64, no antiVirus software is installed.
Device - Samsung s5, android version 6.0.1

Vickyexpert
  • 3,147
  • 5
  • 21
  • 34
Sergii
  • 1,017
  • 1
  • 10
  • 19
  • 3
    try changing your device cable... might be the issue in device cable.. – Arpit Patel Oct 03 '16 at 09:31
  • changing cable,changing port,updating adb and using following commands might help: `adb kill-server` `adb start-server` . If none of that works change device :) – Rushi M Thakker Oct 03 '16 at 09:35
  • Cable is fine. I tried another one - same result. (and windows wouldn't see the device if cable were broken). I tried this commandos - didn't work. I tried another device - got same error. Tried different USB ports. ADB is updated. – Sergii Oct 03 '16 at 09:47
  • Did you grant permission on the device for the PC? – MichaelStoddart Oct 03 '16 at 09:56
  • Also, check phone charge jack. data line may be interrupted while charging lines are working. – rupinderjeet Oct 03 '16 at 10:08

0 Answers0