可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I'm attempting to transition from Eclipse to Android Studio today. I generated the Gradle build files in Eclipse and imported into Android Studio. I changed my preferences to run the app from a USB device instead of the emulator. Now when I run my app with my phone plugged in, all I get is a message that says "Waiting for device."
Has anyone else tried out Android Studio and got an app running on their phone? I'd appreciate any advice. I've been trying for quite a while now.
回答1:
I get this from time to time and a simple unplug/replug of the device does the trick.
回答2:
If you have an LG G3
I've seen a couple of posts about people having issues connecting their LG G3 to adb...major PITA because the solution is very non-intuitive.
Turns out you need to switch the USB mode to Send Images (PTP). You can find this menu by clicking on the notification item that says "Tap for more USB options" right after plugging your phone in.
More info: http://forum.xda-developers.com/lg-g3/general/guide-connecting-lg-g3-to-linux-adb-aka-t2821673
回答3:
I have LG G3
connected to Android Studio and got USB device not found
.
I fixed this problem doing the following steps:
Enable Developer option
In there, check USB debugging
and Allow mock locations
Go into Tethering & Networks
and put USB tethering ON. Bluetooth didn't work for me.
Finally, run debug in Android Studio
回答4:
I started getting this message after I had disabled the "Media device (MTP)" and "Camera (PTP)" option in the "USB computer connection" option found in Settings > Storage > USB computer connection. Re-enabling one of either MTP or PTP fixed the issue for me.
回答5:
this also help me some times :
adb kill-server
adb start-server
and phone or emulator is reconnected to adb
回答6:
I had same problem and I was able fix that problem.
My error was:
Waiting for device. USB device not found
This happens when I was using SONY XPERIA Tipo Dual and Samsung Galaxy Core Duos i8262.
I solved problem in both devices.
SONY XPERIA Tipo Dual
- Check whether "USB debugging" is enable or not in Settings->Developer Options
- Connect device to PC and run your app. Make sure "Target Device" as "USB Device" in Run/Debug Configurations.
- If error was "Waiting for device. USB device not found", Go to "Device Manager" and check your device is categorize as "Other Devices" in yellow color. That means your device is not detected by Windows.
Install "SONY PC Companion" which is automatically detect your driver.
Run your app again. You can see your app is running in your device.
Samsung Galaxy Core Duos i8262
- Check whether "USB debugging" is enable or not in Settings->Developer Options
- Connect device to PC and run your app. Make sure "Target Device" as "USB Device" in Run/Debug Configurations.
- If error was "Waiting for device. USB device not found", Go to "Device Manager" and check your device is categorize as "Other Devices" in yellow color. That means your device is not detected by Windows.
Install USB drive. You can find it here. Direct Url to download
Run your app again. You can see that still you are getting same error. Go to notification section. You can see that, phone is connected as a media device(Media device(MTP)). You need to change it as "Camera (PTP)" by touching notification.
Run your app again. Wow. It works...
回答7:
Ensure Debug mode is turned on, as well as allowing installations from unknown locations, if the problem continues, unplugging the device, rebooting and plugging the device back in should work
回答8:
I have the same problem. I am using Kubuntu and I can get the phone to recognize it, but it is gibberish in the "Device" and "Serial" columns, producing only a NULL and ?????'s. I have tried to use the emulator but even that is buggy. I got the emulator to start only to have it "lose" the phone icon, (without the persistence button checked either) and the camera icon, as well as it saying "could not access the package manager".
I restarted the program, and all was working fine. It helps to have patience.
回答9:
This is to do with the RSA security authentication that happens between your PC and mobile. When you connect your mobile device with USB debugging enabled, you must be getting a popup to authorize the computer to use USB debugging on your device. Just check "Always allow" and things should work smoothly.
Actual problem is when you connect your device to your PC the first time after enabling the USB debugging, the popup for RSA authentication just disappears after a while. So all you have to do is, disconnect and reconnect the mobile device and set the authorization on popup.
回答10:
Solved it after switching to another USB cable.