The AVD Manager in Android Studio doesn't show my device but adb devices
does show it. Am I missing something obvious here?
This question is related to
android
android-studio
adb
device
avd
I also had this problem. After looking though my edge 6 the enable usb debugging was greyed out and unable to be turned on. Quick google search showed it was the myKnox security program that was stopping this from being used. all you need to do is uninstall myKnox and you can then allow usb debugging. This solved my problem with the choose device dialog now showing my connected phone.
Since no-one else seems to have mentioned this, I had this problem on Windows 10 and fixed it:
ANDROID_HOME
was set in the system environments variables and then restarting Android Studio (you may have to log out and log in again / restart explorer.exe).Switching to PTP USP Option instead of MTP is the solution.
not sure if this question is still open. But I solved the issue by switching to a different usb cable. hopefully, this can save you a couple hours. lol
There are many reasons why Android Studio doesn't see mobile phone.
One of them is a problem with ADB Interface driver. You can check it in your Device Manager:
If you don't have ADB Interface driver, then use this guide to install it for Intel chipset: Installing the Android Debug Bridge (ADB) USB Driver on a Windows Computer.
If you have other, but not Intel, then try to search for the driver on manufacture's web-site.
For Xiaomi phones, turn off MIUI optimization in the very bottom of Developers mode menu.
Try changing mode of usb connection to midi devices. Thats what worked for me.
This is what worked for me:
In Android Studio do this: File – settings – languages and frameworks – flutter . Then point to the spot in your computer where you flutter is stored at, like: C:\Desktop\Flutter for example.
Hope it helps. : D
I had to killall adb
because somehow, Android Studio managed to crash and did not want to communicate with adb anymore. Thus, my device did not show up.
So quitting Android Studio, terminating all adb instances in Terminal and starting Android Studio again (should ask if it should enable debugging then) worked.
I have faced same problem in windows 8 and found the solution.
1) Right click on My Computer.
2) Click on manager.
3) Go to Device Manager.
4) Right click on device name (Which below on Other devices).
5) Click on Update Driver.
6) Click on next.
7) Click on Let me know... label.
Driver will be installed automatically.
Its works fine for me.
I had usb to usbc hub on my macbook pro which was blocking the device somehow, it worked when I connected it directly with the apple usbc to usb dongle.
It's my first time running Android project today through Android Studio since its 2.x version, and I have the same problem. However, this is with the Flutter plugin. I have a workaround for people with similar setup.
My setup:
ANDROID_HOME
is defined, PATH
includes all the required tool pathsObservation
adb devices
gives the correct device info;flutter devices
shows correct device info with more details;Android
as detected USB device;<no devices>
;My workaround
cd
to my project root;flutter run
and the app is correctly deployed and runs fine;After that, my observation
But at least I'm no longer blocked.
Reference:
Before you do anything complicated, this might be a simple problem. Just unplug and plug back in.
You also might want to check that your configuration is set up to launch to your phone.
run --> edit configurations
And make sure that you either default to the USB device or the chooser dialog if you are going to be switching between devices on your emulator as well.
In my case, I had to set up my android to enable USB debugging
.
It works for me by following steps below:-
If you using Windows, the device won't show up because of driver issue.
Go to device manager (just search it using Start) and look for any devices showing an error. Many androids will show as an unknown USB device and comes with exclamation mark. Select that device and try to update the drivers for it. for update part follow the link:universal adb
But before that, you have to update your sdk manager and make sure Google USB Driver package is installed.
When done, the driver files are downloaded into the \extras\google\usb_driver\ directory. Hints: Search "android_winusb.inf" under Windows Start and Open File Location to get the directory mentioned.
Open up your device manager, navigate to your android device, right click on it and select Update Driver Software then select Browse driver software. Follow the file location path previously to install Google USB Driver.
Restart Android Studio and Developer Options in your android device and reconnect USB.
Cheers !
Thing which worked for me is is to uncheck the usb debug mode under your mobile setting developer option and allow again it will show the my device option
When I faced this problem I was on Android Studio 3.1 version. I tried a lot of approach above, nothing worked for me ( Don't know why :/ ). Finally I tried something different by my own. My approach was:
Before going to bellow steps make sure
*Your "Google USB Driver" package is installed ("Tools" -> "SDK Manager" -> Check "Google USB Driver" -> "Apply" -> "Ok").
*If you are trying to access with emulator then check "Intel x86 Emulator Accelarator(HAXM installer)" is instaled. ("Tools" -> "SDK Manager" -> Check "Intel x86 Emulator Accelarator(HAXM installer)"" -> "Apply" -> "Ok")
Hope this will help somebody like me.
I have found that what works for me is:
CD
to your sdk platform-tools folder
Check if adb sees your device
./adb devices
If it displays 'List of devices attached' and a blank line below, then restart adb as follows:
./adb kill-server
./adb start-server
then re-run ./adb devices
and see if it picks up the device, eg as follows:
List of devices attached
015d2bc285601c0a device
I was facing the same issue. Turned out to be a faulty data cable. The device would start charging but would not show up in connected devices in Android Studio.
Trying another cable worked fine.
Try another cable first if you have been using your current one for a while.
For Samsung Galaxy s4 i resolved issue by instaling Kies software, after that everything works like a charm.
Update last usb driver
After updating to Android Studio 3.1, it stopped seeing my devices, but adb
saw them fine.
To resolve this, you need to start debugging with an emulator once and after that switch back to USB Device
in Run
-> Edit configurations...
-> Target
. This time it should work.
There are a lot of changes in Android Studio 3.1 vs its previous versions, so you have to kinda reset debug target in order to make your devices work.
I have recently faced this issue with my new allotted PC by my company That is a Lenovo L450 (with Windows 10 installed) and I am not able to connect my phone (Redmi note3) to use for debugging purpose. My Android device is working fine with my other PC for debugging purpose.
I also tried commands related to the adb and I try to find all possible solutions. Then I go for YouTube help and this video is very useful: https://www.youtube.com/watch?v=7KdH4j7aAPM
try the following command and reconnect your device, it will show up.
adb kill-server
_x000D_
On your device:
Go to settings/ developer settings/ allow USB debug mode
If 'allow USB debug mode' option is disabled. Then you might have the device currently connected to your PC. Disconnect the device and the option should now be available
Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
If it still doesn't help, you can google it with this expression:
How to enable developer options on YOUR_PHONE_TYPE
My setup
When running a Kotlin sample project from Google's Android github repo, there is no configuration, nor devices showing up in the UI.
File > Sync Project with Gradle Files
Preferences > System Settings > HTTP Proxy
to specify a working proxy.buildscript{ ext.kotlin_version }
runs a more recent version. I had to upgrade it from 1.2.xx to 1.3.xx. The idea is to fix USB driver on your computer. Start -> Device Manger -> Other devices. Right click on the USB device then Update Driver Software -> Browse my Computer ..-> Let me pick... -> Android device -> Next.
UPDATE 2020 Nov 27
One more reason is your cable which might be broken (only charging is available but not debugging). Hence, buy a new one! ^^
Known that "Can't connect a device with Android Studio" is such an annoying issue to newbies, but I'm kind of an old hand at Android for a quite long time. Most of the common methods have been tried:
HOWEVER, what works for me is to REVOKE ACCESS again for the computer your device will connect to, namely:
Also try uncheck "Tools" - "Android" - "Enable ADB Integration".
This is work for me after update Windows to 10.
Do the following steps to solve above issue.
Project
"Create Run Configurations"
All tests
. (second option)General
Tab --> Target device
Env - AS 3.3.2 Linux 4 (ubuntu)
in AS used menu Tools > Create desktop entry
Desktop file content - ( note the path does NOT include Platform-tools )
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Android Studio
Icon=jetbrains-studio.png
Path=/home/rob/android-studio
Exec=sh -c ' /home/rob/android-studio/bin/studio.sh'
StartupNotify=false
StartupWMClass=jetbrains-studio
OnlyShowIn=Unity;
X-UnityGenerated=true
Note that the location of SDK.platform-tools 'adb' below will not be found by desktop.PATH above:
$ which adb
/usr/local/src/android-sdk-linux/platform-tools/adb
On my setup, my symptom was that any terminal would list the device OK but the toolbar button in AS would never show a connected device... "no devices" is all i would ever see when my phone was connected via USB cable.
SOLUTION for me was adding the correct PATH near the top of the file:
${AS_HOME}/bin/studio.sh ...
PATH=$PATH:/usr/local/src/android-sdk-linux/platform-tools:/usr/local/src/android-sdk-linux/tools
In my case the solution was to close to restart Android Studio
In my case, and I know this is dumb, but here's what I had to do.
I had tried all the solutions above and none worked. A good key to t-shooting is when adb devices
won't list the device, then you know you aren't cooking with gas yet.
Switching between USB modes won't have an effect until the device registers as a device over adb. You'll know when that happens because you'll get a prompt about an RSA key.
It was a relatively new install of Windows 7. Under USB in my phone's notification area, I switched to Install Driver and let it install my adb driver. In my case I was never going to get anything legit over the internet.
Once I saw that successfully install, I switched to PTP and it all just worked.
I plugged my phone in and it was detected fine (no need for device manager or anything like that).. but Android Studio wasn't seeing it.
I found it takes two requirements to be met
- PTP (not MTP)
- USB Debugging mode on
For PTP , go to settings..storage..usb connection..PTP (For MTP/PTP , maybe on my nexus it's there, but on my doogee I see it under 'developer options' .. then under networking , above input, it says "select usb configuration")
For USB debugging, settings..about..tap build about 7 times, then a new option appears for usb debugging and you can turn it on.
Added this is also relevant for USB debugging or MTP/PTP being moved https://android.stackexchange.com/questions/213059/where-is-the-mtp-and-ptp-option-in-android-9
Check device driver if your device is Galaxy install Kise will search your driver
if your Windows cannot even install the driver, you should go to Device Manager and get the Device ID (right click on your device->Properties->Details->Hardware Ids (in Property). Install the Google USB drivers from Android Studio. Go to android_winusb.inf file (under ANDROID_SDK_DIR/extras/google/usb_driver/) and add your Device ID according to the file format. Run "adb devices" again and everything works fine.
I'm sure this might be useful for someone out there. In my case I am running Android Studio in a mac and also trying Visual Studio Xamarin. Having both of them opened at the same time was creating this conflict. So closing Visual was enough.
In my case the following steps helped to resolve the issue:
1) Ensure the package "Google USB Driver" is installed in Android SDK Manager
2) Download "ADB Driver Installer 2.0" from here
3) Run the tool downloaded and connect your smartphone; in my case it showed that the driver had been installed incorrectly and suggested to fix it
After those steps my Android Studio instantly recognised the device! Both MTP and PTP started to work.
Tested for Samsung (Android 4.1.2) and Xiaomi MI4W (Android 4.4.4)
In my case There was multiple instance of adb got created. Unplug device from system. Open Task Monitor (Activity Monitor) and check for adb instances. Kill all adb processes. Try to connect device again. It might work.
In my case
android studio suddenly stop seeing my device
I fix it by change USB option to Media device (MTP)
how to get USB option from storage USB Computer Connection
check Debugging from developer options
try re-run on device , it should work
issue
USB option was charge only
UPDATE ANSWER 26/7/2016
there many reasons like not enabling developer mode --> USB debugging(if you dont see developer option click 7 times at build number )
but I face another issue every thing was works just fine suddenly android studio cant see my device
to fix this issue you need to restart adb , from terminal
adb kill-server
adb start-server
or from ddms
in devices section --> click at small arrow down --> restart adb
I have been troubleshotting same problem. I have tried all the tips in this topic in posts above me.
My situation was: - computer have seen my tablet - had debug usb options in developer mode on - adb in sdk was not seeing my device, killing & start didnt help
The problem was I had Samsung Galaxy drivers on my win8. When I went to devices manager, there was Lenovo A7600 Tablet with yellow marking. Settings -> actualize drivers -> choose from existing ones and i hooked up the Samsung drivers to this one.
It worked like charm.
Turn on USB debugging and connect the device to PC. Wait until the device gets detected by PC. While connected, turn off USB debugging and turn on it again.
I am using Android Studio 4.0, Android Studio said "Device was detected by ADB but not Android Studio". I tried re-enable "developer option" and "usb debug", re-plugin the usb, but no luck. I restart the Android Studio and it works.
Please try restart the Android Studio.
Hope it could save you some time.
If every configuration is sorted, what worked for me was to switch the device to be connected at PTP
and then back to MTP
.
I use the Android version of Nougat API 24, I solved a device problem not detected by replacing the USB cable.
In case anyone having problem with Samsung GT-I9060 I followed this answer on SO:
If you are on windows, many times it will not recognize the device fully and because of driver issues, the device won't show up.
- go to settings
- control panel
- hardware and sound
- device manager
And look for any devices showing an error. Many androids will show as an unknown USB device. Select that device and try to update the drivers for it.
I uninstalled the device, unplug the device and plug it again. This time Windows properly installed the driver. What a bummer.
None of above answers solved my problem until I updated SDK platform-tools.This maybe one of the causes of this issue.
The AVD Manager is for emulator images. It never shows hardware. This is true for any usage of the AVD Manager: Eclipse, Android Studio, etc.
Try the following solutions (for Windows):
Go to your sdk tool installation path, and under \sdk\platform-tools folder and run this command:
adb devices
If your device it listed it should show something like this:
C:\android\sdk\platform-tools>adb devices
List of devices attached
081e96500591f039 device
If not, follow this:
Try these commands:
adb kill-server
adb start-server
Make sure your phone has Developer Options in Settings (if not, go to Settings, About phone (or device), click on Android Version multiple times until you see a message).
Make sure USB debugging on your phone is enabled (go to Developer Options in Settings and turn it on)
Make sure you have Select USB Configuration set to MTP (this is also in Developer Options).
Make sure you can see your files in your device in Windows Explorer when you connect via USB.
Make sure you have the driver for your device properly installed (most of the time, this happens when you first plug in your USB cable).
In Windows, right click on Computer, and go to Device Manager, check if you have Android Device right on the root folder and under it should be Android Composite ADB Interface. If you don't have this, you have to download the Google USB Driver. Get it here:
http://developer.android.com/sdk/win-usb.html
In Device Manager, find your device (should have yellow Exclamation point), right click, and update driver (open the folder with the driver you just downloaded)
If this doesn't work, try restarting Android Studio or plugging your device back in again.
Some cheap devices (some $30 tablets) don't provide the USB drivers to connect in Device Manager, so in this case you are out of luck.
I recently had trouble with this, and regardless of what I did(restart adb, edit adb_usb.ini, restart computer+device+swap usb port, reinstall studio etc. etc.) I just couldnt get it to work, and could not even detect my device using 'adb devices'. Finally after about 2 hours of googling and testing, someone suggested switching to PTP instead of MTP on my device. When I did this I got a popup on my device asking me to allow my mac access and suddenly everything worked(had to restart studio for it to show up there as well though).
I might be bumping this thread now, but it is the first result on google search, and I had a lot of trouble finding an answer for this problem, so I thought this should be added as a solution.
I have done numerous ways of handling that issue. Here is the flavor of what you need to follow step by step. I hope it would help you out.
Step 1: Make sure your device is enabled for development.
Step 2: Before you plug your device to PC, make sure you select USB Connection method
.
Step 3: When you plug the phone in, you are given options for the USB Connection method, select Internet connection
. Make sure you have connected to the Internet.
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.
Surprisingly enough, what worked for me on Debian Linux was ONLY:
adb kill-server
WITHOUT STARTING IT AGAIN!!!
The device appeared in the Android Studio as soon as I killed the server. The only reason I spotted this was that my terminal emulator window was transparent. :D
Some cables can not been used for developer mode or transfer file. A solution would be change your cable and don't waste time.
Edited
Some USB3 ports are causing issues too. Not sure if there is a way to check if the cable/usb works. But there is a way to detect the USB type USB2 or USB3? . If you are using USB3 could be a port issue too.
Please see http://visualgdb.com/KB/usbdebug-manual/ as this worked well for me. Had to download and install the USB drivers inside Android studio then actually install the drivers via device manager in windows 8.1
As driver was unable to load, I was unable to connect to my device on windows 7. I followed the steps below:
If you still have this problem (later than summer 2015) maybe you should:
I recently installed Windows 10 (not an upgrade, a clean installation) and I forgot the ADB USB driver
I tried all the suggested solutions, but nothing worked. However, this solution worked:
In the developer options* of your phone's settings, You have to enable the USB debugging option under the Debugging section and accept all the permission requests that popup on your phone screen.
Now my phone is recognized in android studio.
*If you don't see Developer Options displayed in your phone's settings, go to "About Phone" in phone settings -> tap "Software Information" -> tap "Build Number" multiple times until you see a message stating that developer options is enabled.
Android Studio did not show my device (Samsung Galaxy Alpha) on Windows too until I downloaded and installed a Windows driver from Samsung Support page. I had to use the MTP connection mode on the device. I also confirmed authorizing the computer after I connected the device to it for the first time.
Especially if you had a connection previously, if you are using some other application that used ADB connection to your phone - close that application. I have Total Commander that has plugin for ADB connection to mobile phone, and that solved my problem.
My Nexus 5 phone did not have developer options in the settings menu. I had to do the following:
On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
while doing all this don't forget to increase the sleep time, so that if the device prompts for authentication on the mobile device you know that the connection is succeeded.
Try 1:
Installing Google USB Driver from Developersdeveloper.android.com didn't work for me.
Try 2:
Try 3:
Try 4:
Try 5:
I know it sounds crazy but i just reboot my phone while was connected and it appears
Be sure that you have downloaded the correct API for the version you device is using. After updating your device's Android version or switching to a different device you may not have the correct API downloaded on Android Studio. To do this:
Check your devices Android OS version by going to Settings>About Phone>Android Version
Make sure you have the correct API installed in Android Studio in the SDK Manager
Many answers already but I had just downloaded a simulator running O, and after that no device ever worked again. I deleted the emulator from AVD manager killed adb and then restarted Android studio. Moved the USB to another port and the device was there again.
If you use Samsung you can download and install the device driver from Samsung.
Note
You need to enable ADB mode(Like the eleventh comment)
You need to set Target in Android Studio to "Open Select Deployment Target" Dialog. To set Target : Run > Edit Configurations > Targets > Open Select Deployment Target Dialog
Source: Stackoverflow.com