[android] Android Studio doesn't recognize my device

Here is the problem. I want to run my Android Studio apps on my device (Samsung Galaxy Ace 2). But nothing works for me. Tell me what I've missed:

1) USB debugging is on

2) ADB driver is installed (in device manager i can see Android Composite ADB Interface)

3) ADB device list is still clear, even if i reset server(adb kill-server, adb start-server, adb devices - list of devices is clear)

4) in google usb driver directory, in android_winusb.inf file I added my device identificators

5) Android device manager still cannot connect to my device, showing this error when I reset it: "adb connection error an existing connection was forcibly closed by the remote host"

So I will be glad to hear any advices. Hope you'll help me

This question is related to android android-studio adb

The answer is


I also tried above solutions but got no luck. So here's what I did:

  1. Download and install PdaNet+ to fix connection issues between my computer and android device
  2. Enable USB debugging on my android device
  3. Unplug the phone and plug it again after it's installed
  4. Run my app and voila! My android device is now recognized by Android Studio

In addition to the above configurations, I had to set deployment target to "Open Select Deployment Target Dialog", run once (choosing my device from the options listed), and from then on Android Studio was able to see my device even after changing the deployment setting back to "USB Device". My SWAG is that since Android Studio uses its own internal cache to find your device, it has to be initialized first.


Try swapping the USB port the cable is plugged into.

Sounds crazy but after 20 minutes of debugging this worked for me.


On HTC mini one 2, besides enabling the Developer Options, the following worked for me:

  1. Go to More in Wireless & Networks
  2. Mobile Network Sharing
  3. In USB network setting
  4. Select Internet pass-through

I had the same problem. So here is what i did

  1. reinstalled the device driver
  2. changed the USB computer connection from MTP to Mass storage(UMS)

And it worked.


I have done numerous ways of handling that issue. Finally it has worked! I am using LG Optimus II, but I believe the following steps are generic to other Android devices as well.

Step 1:

Make sure your device is enabled for development. If yes, go to Step 2, otherwise go to Settings > About phone and tap Build number seven times which is magic number :-). Now Developer Options is available in the Settings.

Step 2:

Before you plug your device to PC, Go to Settings > Developer Options and select USB Connection method.

Step 3:

Plug the phone to the PC, you are given options for the USB Connection method, and please select Internet connection. Make sure you have connected to the Internet. By the way, I have changed MTP to PTP, it did not work for me. Therefore, I tried Internet connection mode, then it worked.

Step 4:

Run the app in the Android Studio, it will ask you to authorize the device for development, and select YES!.

Step 5:

Run the application via Android Studio and choose the device, not emulator, and BINGO! Welcome to Android development board.


I was on Samsung S8 and had same problem too. After I installed Samsung Kies, issues was resolved for me, as I believe it had updated the correct driver required for my Samsung S8.


Did you try to configure the "Media Mode" in "Camera (PTP)" instead of "Media device (MTP)"? This is sometimes solving the issue. Its in the USB Computer Connection options of your Android device, you should see an "authorize" dialog then.

Update 04/2017: looks like it has been fixed in Android 7.1.2


For me, I tried the above. Turns out my USB cable was bad. I changed the cable and then it worked.


i had to install android studio in 2 machines and ive solved this problem intalling samnsung kies, i use 3 diferents samnsung devices (plus some other of my family and friends) and i dont have to strugle with the drivers, it works for me and i recomend it. hope it helps


Although my computer could recognise my phone, I had to install the official drivers from the Samsung developer site to get adb/Android Studio to recognise it:

Samsung Android USB Driver for Windows


I had a big problem with my Samsung S10 Plus as it was not detecded by Android Studio on my Macbook even if I did all what is required to be detected, that is to say:

  1. Enable developer mode (7 taps on Build version in Android settings)
  2. Enable USB debugging

What I did is to start "Android File Transfer" on my Macbook and the magic happened. A popup appeared on my device asking if I want to authorize an USB access to it. I clicked "Yes, always" and now Android Studio can detect my device on my Mac :)


Click Revoke USB debugging authorization in Developer option and try it again.


For me, this ended up being because I had the wrong SDK level installed (new version of Android Studio installed the SDK for Android 10, whereas I have a device that runs only Android 8.1). While Android Studio would "recognize" the device and display a string in the "devices" menu instead of just saying that no device was connected, installing the right SDK level for my device ended up changing the string to something recognizable (my device's model name) and allowed me to actually run my app over ADB.


If you have Mi Device than you need to enable this two option after enabling Developer Mode.

  1. USB Debugging (Enable = True)
  2. Install via USB (Enable = True)

See this screenshot.

enter image description here


LG Optimus Zone 2 pp415 d\n connect in mtp, but does work in internet connection mode. Lost lots of time messing with it. There's no doc for this, but I'd suggest trying all 4 of the connection options. Only 1 that works for me is Internet Connection->Ethernet, then win 8 auto-detects a driver and installs it. In MTP mode despite all drivers being registered with device manager, adb doesn't pick it up.


Solution for those working with Huawei phones - You will get this error when ADB interface is not installed. Check if you have installed Huawei HiSuite. USB driver gets installed when you install HiSuite (I suppose this is true for most of the new phones that come with a Sync Software). If the ADB interface is installed on your computer you should see 'Android Composite ADB Interface' under Android Phone in your Device Manager as shown in this picture. enter image description here


Change the connection method Build-In CD ROM it works for me


In my case it was due to already running and hanged adb.exe on another user under my PC. I had two users on my PC, the second user had the adb.exe process hanged even when I tried to end the process. It worked with me after (End Process Tree) from the Task Manager.

Hope this will help someone with multiple users :)

Ahmad


On Windows 7 , the only thing that worked for me is this. Go to Device Manager -> Under Android Phone -> Right Click and select 'enable'

enter image description here


Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to android-studio

A failure occurred while executing com.android.build.gradle.internal.tasks "Failed to install the following Android SDK packages as some licences have not been accepted" error Android Gradle 5.0 Update:Cause: org.jetbrains.plugins.gradle.tooling.util This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()' Flutter plugin not installed error;. When running flutter doctor ADB.exe is obsolete and has serious performance problems Android design support library for API 28 (P) not working Flutter command not found How to find the path of Flutter SDK

Examples related to adb

ADB server version (36) doesn't match this client (39) {Not using Genymotion} ADB device list is empty "unable to locate adb" using Android Studio Run react-native on android emulator Solving "adb server version doesn't match this client" error Adb install failure: INSTALL_CANCELED_BY_USER Session 'app': Error Installing APK Where is adb.exe in windows 10 located? How to debug in Android Studio using adb over WiFi Set adb vendor keys