简体   繁体   中英

Android Studio can't detect Samsung S5

I have a SAMSUNG S5 and i'm starting to learn how to program in Android. At first Android Studio detected my device and I was able to test my programs fine but all of a sudden it can't find it anymore. Everytime time I go to 'reset adb' in Android Device Monitor it always gives me this error:

Adb connection Error:An existing connection was forcibly closed by the remote host

My computer detects my device but Android Studio does not.

I've tried restarting Android studio and my entire computer.

I've tried different USB ports and USBs.

I've also tried uninstalling and re installing the driver.

Nothing works, please help, thanks.

Also, try changing usb computer connection type (found in notifications bar). For me, connecting as a camera (ptp as opposed to the default mtp) was the solution.

Make sure you have downloaded the latest version of the googleusb driver from your SDK manager. If that doesnt help try a Samsung universal ADB driver :

http://download.clockworkmod.com/test/UniversalAdbDriverSetup6.msi

And of course dont forget to enable USB debugging on your device

I figured this out - for some reason my phone shuts off USB Debugging for no reason. I still sometimes get this issue after I've turned it on and I look at my phone and its off again. Really weird but that was the problem.

You must check these first:

1- Install Google USB Driver --> open SDK Manager and then download and install it

在此处输入图片说明

2- Enable USB Debuging mode in your phone--> in Settings--> Developer options

I ended up downloading Samsung USB driver from here: http://www.samsung.com/us/support/downloads

You have to choose your device and then you can download and install the software.Then restart adb:

adb kill-server
adb start-server

You can see your device added into devices in adb by running this command:

adb devices

在此处输入图片说明

All of these answers didn't work for me.

I had to follow these instructions to enable developer builds to the device:

  1. Go to the menu
  2. Launch Settings
  3. Access the “About Device” menu
  4. Go down to “Build Number”
  5. Then tap on the build number 7 times
  6. After the 7th tap you will be told that you are now a developer
  7. Now when you go back to the settings menu, the developer options will now be enabled and you can do whatever you want in there.
  8. Now to enable USB debugging you will need to open Developer options and tick the box that says USB debugging.

via https://www.androidpit.com/enable-usb-debugging-on-samsung-galaxy-s5

Thanks to John, who posted the link in this comment: Android Studio can't detect Samsung S5

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM