I tried running my first Hello World app in android studio in my samsung phone, but I got this message even though the phone was connected through usb:
no usb devices or running emulators detected
note: usb debugging is enabled in my phone
How can I solve this problem?
Connecting your device for development. (Preferred and Fast developing option)
Open your phone's setting->developer options and turn on USB debugging. Then connect your device.
Download Google Usb Driver from SDK Manager. Install your device's required drivers on your computer. And connect.
Using emulator(slow process)
Create new android virtual device(AVD) and download required sdk versions.
Run your app on AVD.
Hope it helps!!
you can solve this problem by the following:
1-make sure the oem driver for samsung (SAMSUNG_USB_Driver_for_Mobile_Phones) is installed
2-if you have another usb port,try to disconnect your phone,and reconnect in another usb port
the second solution solved this problem well>>>>>
install the Samsung kies3 and it will work
This happened to me after upgrading Android. I am running a Google Pixel phone. When I did the upgrade, the USB Configuration setting on my phone, apparently, changed from MTP (Media Transfer Protocol) to Charging. I changed it back to MTP and it works now. I upgraded from Android 7.1.1 to 7.1.2.
Related
I'm running Android Studio Arctic Fox 2020.3.1 Patch 2 on my Dell XPS 13-9370 running Linux Ubuntu Ubuntu 20.04.3 LTS and when I try to connect either of my two Pixel 2s via USB, Studio fails to see them. I have USB debugging enabled and have tried setting Default USB configuration to both File transfer and PTP, to no effect. I also tried swapping USB cables and all the other steps described in the Android Studio Troubleshoot Device Connections.
I should mention that I have no problem connecting Studio to my Samsung Tab A running Android 11, or to any of the emulated devices. They all connect just fine. When I plug the USB cable into the Pixel 2s, I don't even get the permission prompt, even after revoking USB permissions.
I've been knocking my head against a wall on this for a couple of days now, trying out every relevant suggestion I've found on Stack Overflow. I used to have no problem connecting my two Pixel 2 devices up until a few days ago. The problem also occurs on the previous version of Android Studio. I thought it might have something to do with several new third-party apps I installed, but I forced stop them, rebooted the device and still the problem remains.
You can hard reset your devices because in some cases that works.
Otherwise, You can use the developer options wirelessly on your phone.
Just read this article for a step by step guide for how to do this.
Use Android device for development wirelessly
are you using same usb cable for other devices in which it is working ?
try this once - open developer option and select 'Select USB Configuration' . make it mtp and also check if usb debugging is turned on.
Instead of doing it with a cable you could do it wireless just install the plugin adb wifi rest all the instructions are given when you will install that plugin.
Android WiFi ADB
Steps to do this(in short)
Connect your device to your computer using a USB cable.
Then press the button picture of a button to be pressed on the toolbar and disconnect your USB once the plugin connects your device over WiFi.
You can now deploy, run and debug your device using your WiFi connection.
NOTE: Remember that your device and your computer have to be in the same WiFi connection.
Sometimes it happens for the USB connector manager of your operating system. You can uninstall the USB connector manager from your OS Device manager and then restart your laptop. I faced this issue several times and this solution worked for me.
Try to install Genymotion Emulator and Launch it first before running your app. I did it and it helped me and i think it will be work
in the last week, I've been trying to connect my Meizu m2 phone to my computer for debugging purposes (running an app from the android studio) without any success.
I've enabled my USB debugging mode on my device, I've connected it to be on MTP rather than PTP, and I've also taken a look at my computer's device manager, and seen that the device wasn't listed under other devices category, and honestly I couldn't tell where was he listed.
In addition, I've opened an android studio and pressed the run-app button, but my phone wasn't recognized by the android studio.
Please help me fix this issue.
Follow these steps:
Try installing PdaNet+ Windows app
http://pdanet.co/a/
Install PdaNet+ Android app on your device. Download from Play Store https://play.google.com/store/apps/details?id=com.pdanet&hl=en
Now connect your phone to PC/Laptop
Open Android Studio and check device connected or not
Hope this will be helpful...
There is many reasons and some instructions :
1- disable driver signature enforcement and connect again
2- install Universal Driver
3- install another ADB Driver
Android Studio is not recognizing any external emulators (phones) connected to it.
I have tried the following mentioned things without any success:
Installed the device driver. (It is working fine. The device recognizes my
phone.)
Turned on USB Debugging.
Kill-server and then start-server commands.
I am using Android Studio for Windows.
Probably you haven't installed the driver for your phone (if you use Windows). For instance, if you use Nexus or Pixel phones, you should install this. If you use Samsung phones, try this link.
It worked for me. If you still cannot see any of the devices, try calling 'Invalidate Caches / Restart' in the File menu in the Android Studio and restarting the system.
Hope it helps!
I had the same problem, my problem was I was using a cable that cam with the phone that acsually would not transfer any data from\to the phone, the moment I changed the cable it worked like magic.
Just try changing a cable 1st, the PC has to recognize the device even if You have no drivers, if Your phone doesnt ask You to give permission to access from PC than the cable is just a charging cable!
Hope it helps.
Set up a device for development (android documentation) :
On the device, open the Settings app, select Developer options, and
then enable USB debugging.
Set up your system to detect your device.
For Windows: Install a USB driver for Android Debug Bridge (adb). For an installation guide and links to OEM drivers, see the
Install OEM USB Drivers document.
When you connect a device running Android 4.2.2 (API level 17) or
higher to your computer, the system shows a dialog asking whether to
accept an RSA key that allows debugging through this computer. This
security mechanism protects user devices because it ensures that USB
debugging and other adb commands cannot be executed unless you're able
to unlock the device and acknowledge the dialog.
I'm trying to test an Android application and have a device connected via USB. The device detects (and charges off) the USB connection but I can't seem to find any record on the computer (running Windows 7) that the device is connected. I looked in Device Manager and did not see an "Android Devices" category, nor did I see an "Other Devices" category. I looked on the device manufacturer's website to see if they had drivers; I could not find any. Does anyone have any idea as to how I could get the device to show on the computer? Thanks!
Most probably windows and especially android adb will see your android device after installing the Google USB Driver
I had the same problem for many of my android devices and most of them are running fine with the driver from google. Only for some sony devices I had to install special drivers.
In Android Studio go to Tools -> Android -> Android Device Monitor. Once it opens close it, this will reset your adb and you should be able to see your device
Your problem sounds related with drivers
the Google USB Driver works only for some android models, some other drivers are installed as plug and play but some others you have to install manually.
http://developer.android.com/intl/es/tools/extras/oem-usb.html
Also sometimes it happened to me that the adb didn't recognize the device while the screen was locked so you could also check that out.
It turned out that the USB cable I was using was a charge-only cable. After switching the cable out, the device showed on ADB.
For several weeks, I was able to connect my Nexus 7 2 to my computer running Windows 7, and Eclipse would recognize it, allowing me to run apps on it. The device also showed up when I ran the adb devices command. Every time I plugged the Nexus 7 into the computer, the tablet asked if I wanted to allow USB debugging at that time. (Oddly, it never asked me whether I wanted to always allow it from that computer, but I didn't care.)
I recently updated the tablet to Android 4.4.2. I also updated the Android SDKs through the Android SDK manager. Now, when I plug the tablet in, I do not get prompt about USB debugging on the tablet, and neither Eclipse nor adb can see that it is there.
Here is a list of things I tried to do, gathering ideas from various forums around the web.
Re-download the Asus drivers for the Nexus 7 and update the driver. However, Windows does not even recognize this as the right drivers for this device.
Turn USB Debugging off and on on the tablet, and also revoke all USB debugging permissions.
Change the connection mode from media device to camera
Switch the runtime from Dalvik to ART
Type adb kill-server followed by adb start-server in the command line
Delete eclipse and all the Android SDK and download them all over again
None of this worked. Any other ideas on what to try?
It turns out that the Nexus 7 definitely needs the Google USB Driver. Finding, downloading, and installing this driver worked perfectly.
Because Google's Android OEM drivers page does not include the Nexus 7 in its list of devices that need the Google USB driver, I had been trying the driver from Asus, which did not work. I did not try the Google USB driver because for some reason my SDK manager said it had downloaded the driver, but the driver was not to be found.
Finally I found I could download the Google USB driver from this page, which clarifies that all Google Nexus devices need this driver. Now I have successfully re-connected the tablet to ADB.
I submitted a documentation bug report to Google here in hopes that the OEM drivers page can be updated to reflect that all Google Nexus devices need the Google USB driver.
Nexus 7 tablet with Android 4.4.4. Settings > Storage > USB Computer Condition.
Two checkboxes: MTP and PTP. Uncheck both.
With your phone disconnected
In windows explorer - right click computer, go to manage, in computer management find and uinstall device driver (under Android device)
Download new drivers from http://developer.android.com/sdk/win-usb.html#top
Connect the phone, windows will try to install new drivers, install drivers manually with drivers downloaded as above
The above worked for me
For me, after updating to Android 4.4.2, it was critical that I connected the device as a Camera (PTP) rather than as a Media Device (MTP). Previously, before the update, I was able to connect as a Media Device (MTP).
The problem is that you have not all needed drivers (PC can recognise your phone like usb device but debugging would not work). I solved this problem in Android 4.4.4 by uncheking all items (MTP, PTP, UMS) from menu: storage->USB computer connections and than tick 'Media device(MTP). Now all works fine.
thank you Arthur, I found Nexus 7 tab not working even after unchecking or checking. Problem solved by unchecking USB Debugging (under developer options).. settings>Developer option> USB debugging. then check (put tick the MTP device):.storage->USB computer connections and than tick 'Media device(MTP)
Complete checklist:
Enable debugging onto the device
Select USB Connection as PTP (camera)
Install the driver from http://developer.android.com/sdk/win-usb.html
Before you try anything, make sure you update your Build related tools using your Android SDK Manager. Your adb might be outdated.