Android Studio did not recognize my physical device. After trying various solutions, the issue was finally resolved. Here is the documented process.
- Introduction
- Environment
- Solutions for When Android Studio Does Not Recognize a Physical Device
- Conclusion
- References
Introduction
The device was not recognized when I tried to connect my smartphone to my PC using Android Studio.
Even though the device was connected via USB, the window displayed when running the program showed the following message:
No USB devices or running emulators detected Connected Devices <none>
I struggled to find an effective solution and spent quite a bit of time on this. After trial and error, the issue was finally resolved, so I'm keeping a record here.
Note: This article was translated from my original post.
Environment
PC: Windows 10 / Android Studio 3.1.4 / JDK 8
Smartphone: Android 8.0 / Huawei Nova2
Solutions for When Android Studio Does Not Recognize a Physical Device
Change "USB Use" to "Transfer Photos" or "Transfer Files"
When connecting a smartphone to a PC via USB, there are five connection options:
- Transfer Photos
- Transfer Files
- Charge Only
- Power Supply
- MIDI
You can check this setting on your smartphone by navigating to:
Settings > Device Connection > USB
By default, this setting was set to "Charge Only", which was one of the reasons my device was not recognized.
"Transfer Photos" (PTP - Photo Transfer Protocol) and "Transfer Files" (MTP - Media Transfer Protocol) are connection methods that allow data exchange between the PC and the device. Switching to one of these options enabled Android Studio to recognize the device.
In my case, this change was the key solution. However, I had also made other changes beforehand, which I will document below. Some of these steps may not have been necessary, but I'll include them just in case.
Enable "USB Debugging"
Enabling USB Debugging on the smartphone.
Follow these steps:
- Go to Settings > System > About Phone, then tap Build Number multiple times until you see "You are now a developer."
- Go to Settings > System > Developer Options, and turn on "Developer Options".
- In Developer Options, enable "USB Debugging".
One thing to note: USB Debugging may turn off when other settings are changed. I couldn't determine exactly when or why this happened, so I sometimes checked that USB Debugging was enabled whenever I made changes.
Install the Corresponding Android Version from SDK Manager
I installed the Android OS version corresponding to my device using Android Studio's SDK Manager.
To check the supported Android OS versions:
Android Studio Toolbar "Tools" > SDK Manager
If your device's Android version has a "Not installed" status, you need to install it. Check the box for the required version, then click the install button.
Install "Google USB Driver"
Similarly, I installed Google USB Driver from Android Studio's SDK Manager.
Android Studio Toolbar "Tools" > SDK Manager > "SDK Tools" tab
Check the "Google USB Driver" section. If the status is "Not installed", you need to install it. Check the box and click the install button.
Conclusion
In this post, I documented solutions for when a physical device is not recognized in Android Studio.
I eventually solved the issue, but this experience made me realize how little I understood about smartphone internals. Exploring these topics further might be interesting.
I hope this post helps someone!