Android Studio: “Waiting for device.” Trying to ru

2019-02-02 03:10发布

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.

10条回答
劫难
2楼-- · 2019-02-02 03:48

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.

查看更多
甜甜的少女心
3楼-- · 2019-02-02 03:50

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.

查看更多
家丑人穷心不美
4楼-- · 2019-02-02 03:51

this also help me some times :

adb kill-server 
adb start-server

and phone or emulator is reconnected to adb

查看更多
Viruses.
5楼-- · 2019-02-02 03:56

I have LG G3 connected to Android Studio and got USB device not found.

I fixed this problem doing the following steps:

  1. Enable Developer option

  2. In there, check USB debugging and Allow mock locations

  3. Go into Tethering & Networks and put USB tethering ON. Bluetooth didn't work for me.

  4. Finally, run debug in Android Studio

查看更多
6楼-- · 2019-02-02 04:02

I get this from time to time and a simple unplug/replug of the device does the trick.

查看更多
Animai°情兽
7楼-- · 2019-02-02 04:02

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

  1. Check whether "USB debugging" is enable or not in Settings->Developer Options
  2. Connect device to PC and run your app. Make sure "Target Device" as "USB Device" in Run/Debug Configurations.
  3. 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.
  4. Install "SONY PC Companion" which is automatically detect your driver.

  5. Run your app again. You can see your app is running in your device.

Samsung Galaxy Core Duos i8262

  1. Check whether "USB debugging" is enable or not in Settings->Developer Options
  2. Connect device to PC and run your app. Make sure "Target Device" as "USB Device" in Run/Debug Configurations.
  3. 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.
  4. Install USB drive. You can find it here. Direct Url to download

  5. 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.

  6. Run your app again. Wow. It works...

查看更多
登录 后发表回答