ChatGPT解决这个技术问题 Extra ChatGPT

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

So, you've downloaded/installed the device's drivers on the machine?
Some times you need to add device interface id into your_username/.android/config file.
Yes, I downloaded Google USB driver and then replaced my Samsung driver with it
Tugrul Asik, there is no such file in .android directory on my PC
On windows, make sure "ANDROID_SDK_HOME" variable is pointing to your SDK.

F
FrankMonza

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


Unfortunately, I can't change that mode. I searched how to do that, but according to some sources there should be a chooser dialog, where you can choose MTP or PTP. But there is no such option on my device. Do you know another way to do that?
My device works only in MTP and i can select that from the notification area, you can also try the "Universal ADB drivers" github.com/koush/UniversalAdbDriver
Yes, it helped some way. Now I have something really strange - Android Composite Adb Interace (my device) and it's clone Google Galaxe Nexus ADB Interface (also my device). But unfortunately Android studio see none of them
This worked for me. You can change the setting in a Samsung Galaxy Tab in the notifications are.
This fixed the issue in my LG G3 855
c
casillas

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 simply installed correct adb drivers from adbdriver.com. I looked at devices in windows manager and found that it couldn't install it on it's own. This helped me.
After an hour reading on stackoverflow THIS was the ONLY solution, THANKS! (updating drivers via abdriver.com)
N
Nick Sarafa

Try swapping the USB port the cable is plugged into.

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


Sometimes swapping the cable might help too. I once had a USB cable that wouldn't work for debugging but only power.
Thanks for mentioning this. I didn't switch ports, but unplugging and plugging back in kicked the device into debug mode... -_-
actually worked for me. Still unable to figure out why.
It's hilarious that this is my highest up-voted answer in Stack Overflow, and in turn, might be my greatest contribution to the worldwide development community
I just spend 3 hours reinstalling drivers and doing all kinds of crazy shit, to no avail! And this worked!
L
Logesh Dinakaran

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

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


Perfect!! Struggling with the issue for last one day. Wish could have done more upvotes :)
3 hours in, this saved me! It appears to have installed the correct driver for me.
j
jimmyjudas

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


this one really saved me..using samsung GT
You saved my day..!! Hurray...!!
This most definitaly solved my problem as well. Only I had to install apropriate LG driver :)
fixed my note 8
S
Sukumar Nagarajan

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


This deserves more likes.
A
Ajay B

https://i.stack.imgur.com/ecZ1l.png


I've installed the HiSuite but I still see only 'Huawei HDB Interface' under Android Phone, any idea on how to solve it?
P
Prashant Arvind

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

USB Debugging (Enable = True) Install via USB (Enable = True)

See this screenshot.

https://i.stack.imgur.com/eGtQ8.jpg


M
Morgan D

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.


Thank you. Debug mode worked perfected on this after installing the USB driver and connecting over internet connection / ethernet on my LG
i
imharindersingh

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

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

And it worked.


K
Keith Holliday

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


Happen to me for Huewei G9, I have to use another usb cable. Then with properly enabled developer mode on the phone, I can see it's connected on Android Studio.
R
Red Hot Chili Coder

I am sorry that i bothered you all. The problem was my device is cloned in different places in device manager. It was gone when I tried to update driver for my phone in "Other devices" list, and before i have been updating it in wrong sections. Thank you all.


No need to apologize. It seems my answer regarding swapping USB ports still receives regular up-votes. Maybe set it as the accepted answer as this still seems to be a very real problem for Android Studio developers.
A
Ahmad Musa

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


J
Jace

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.


e
einstein6

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.


C
Code_Yoga

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

https://i.stack.imgur.com/45gjk.png


y
yago

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


j
javathunderman

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.


t
toto_tata

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:

Enable developer mode (7 taps on Build version in Android settings) 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 :)


u
user2542398

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


A
Andrei

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

Go to More in Wireless & Networks Mobile Network Sharing In USB network setting Select Internet pass-through