Reputation: 5371
The AVD Manager in Android Studio doesn't show my device but adb devices
command in teminal shows it. How to resolve my issues ?
Upvotes: 513
Views: 1173086
Reputation: 1730
This had been working for me previously (Windows 11), but my device stopped showing up when I plugged it into USB, even though I got a message notifying me of "USB Debugging Connected (tap to turn off USB debugging)".
I tapped the notification, which took me to Developer Options. I toggled USB Debugging off, and then on again. I then got a pop-up saying I needed to confirm permissions. Once I did so, my device showed up again and worked properly.
Upvotes: 0
Reputation: 382
source: developer.android.com - connect over wi-fi
192.168.1.10:36693
823456
[Alt]+[F12]
-> adb pair ipaddr:port
-> [Enter]
. Use the IP address and port number from above. eg. adb pair 192.168.1.10:36693
823456
source: developer.android.com - wireless over CLI
Upvotes: 0
Reputation: 3402
In my case, enabling USB Debugging
in Developer Options
solved the problem. Make sure to grant required permissions upon reconnecting the phone.
Enabling Developer Options
Phone settings >> About Phone >> Software Information >> tap Build Number repeatedly.
Optional Steps
Sometimes, the phone is not detected even with USB Debugging
on. In this case, tap on Revoke USB debugging authorizations
in Developer options
. Grant the required permissions on reconnecting the phone.
If it's still not being detected, then toggle USB debugging
off and on then grant permissions upon phone reconnection.
Upvotes: 13
Reputation: 1548
After spending some time I found the problem was to enable USB debugging option to on. Just find in your mobile Settings->Developer Option->USB debugging. Just enable it and it works. It might help someone!
In case you do not see the Developer Option then try to enable it first: Depending on your device and operating system, you may need to go to "Settings -> About Device or About Phone -> Software Information", then tap "Build number" seven times.
Upvotes: 61
Reputation: 3560
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
Just in case it saves anyone 5 minutes of head-scratching, 'Developer options' is now under 'Settings/System & updates/Developer options'
Upvotes: 333
Reputation: 1764
If your device was working with Android Studio before this issue, then restarting the device can solve the problem.
Make sure to turn on USB Debugging from Developer Options again after restarting.
Upvotes: 3
Reputation: 13046
For me, Macbook USB C Hub was the issue. I connected the phone directly to Mac USB C port and worked like charm! hope this help!
Upvotes: 1
Reputation: 764
This helped me. I followed the instructions on the "Troubleshoot Device Connections" located on the AVD Manager Devices dropdown:
Make sure your Android phone is connected via USB to your computer
Go to your Android phone
Go to Settings > About phone > Software information on your phone
Tap Build number seven times
Developer option is now enabled in your phone
Go to Developer
Turn on or enable USB debugging
Allow computer access to phone
Now click on "Troubleshoot Device Connections"
Click Next until you reach "Restart ADB Server". Click on that and restart
Your device should now show on the AVD Manager dropdown list.
Upvotes: 6
Reputation: 7108
In my case, I had to set up my android to enable USB debugging
.
https://developer.android.com/studio/run/device#setting-up
Upvotes: 5
Reputation: 2740
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.
Upvotes: 3
Reputation: 2916
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.
Upvotes: 133
Reputation: 77
try the following command and reconnect your device, it will show up.
adb kill-server
Upvotes: 0
Reputation: 4497
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:
Upvotes: 10
Reputation: 33
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
Upvotes: 0
Reputation: 3593
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:
Upvotes: 4
Reputation: 21
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
Upvotes: 0
Reputation: 359
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.
Upvotes: 4
Reputation: 1813
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
Upvotes: 0
Reputation: 556
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.
Upvotes: 0
Reputation: 320
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.
Upvotes: 1
Reputation: 2901
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.
Upvotes: 2
Reputation: 11580
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. Upvotes: 0
Reputation: 11580
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:
Upvotes: 1
Reputation: 13743
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
Upvotes: 15
Reputation: 3248
On Windows 7 , the only thing that worked for me is this. Go to Device Manager -> Under Android Phone -> Right Click and select 'enable'
Upvotes: 0
Reputation: 11244
if your device version in 9 then
Go to SDK Tools and Update Sdk same Version and Intstall Google USB Driver
Upvotes: 4
Reputation: 6289
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
Upvotes: 0
Reputation: 1889
I use the Android version of Nougat API 24, I solved a device problem not detected by replacing the USB cable.
Upvotes: 2
Reputation: 606
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).Upvotes: 0
Reputation: 583
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.
Upvotes: 0