Can't find android device using “adb devices”

2019-03-07 19:45发布

I am developing Android application on macOS and my application runs well on the emulator. I want to run it on the device, but when I run adb devices I get nothing.

localhost:platform-tools BF$ adb devices 
List of devices attached 

localhost:platform-tools BF$

I have checked the documentation in the reference about "Setting up a Device for Development". I have done everything step by step.

In the documentation, there are some words: Setup your system to detect your device. If you're developing on Mac OS X, it just works. Skip this step.

Now, I can't find any solution. Does it need special drivers for Android Devices?

16条回答
我命由我不由天
2楼-- · 2019-03-07 20:19

I had Xamarin installed and tried to use Unity. Basically in any case you have to kill any application that might be talking to your device through ADB

查看更多
唯我独甜
3楼-- · 2019-03-07 20:22

I was having this problem. It turns out my fix was to change the USB cable I was connecting with. I switched back to using the cable that came with the phone and it worked.

Using Samsung Galaxy Player and Samsung micro USB.

Yes. This is incredibly dumb.

查看更多
欢心
4楼-- · 2019-03-07 20:23

Are you by any chance also using the app EasyTether while connected to your Mac? If you happen to use this app, you're in luck, because the solution is to call:

sudo kextunload -v /System/Library/Extensions/EasyTetherUSBEthernet.kext

from a terminal. I forget if you have to reboot or not.

This will disable tethering, but you can now see your device via adb.

To renable tethering once you're done debugging, use

sudo kextload -v /System/Library/Extensions/EasyTetherUSBEthernet.kext

Of course, if you're not using EasyTether, then hopefully someone else has an idea....

查看更多
Viruses.
5楼-- · 2019-03-07 20:23

If using adb devices on Mac OS X no device is displayed and, of course, you have enabled the USB debugging on your device (see http://developer.android.com/tools/device.html), then try with:

$ android update adb
adb has been updated. You must restart adb with the following commands
    adb kill-server
    adb start-server

Then:

$ adb kill-server
$ adb start-server
* daemon not running. starting it now on port ... *
* daemon started successfully *

And finally:

$ adb devices
List of devices attached 
......  device

Your device should be now in the list.

查看更多
小情绪 Triste *
6楼-- · 2019-03-07 20:23

You will need USB driver installed correctly and have debugging enabled in settings. if these dont work there could be something wrong with your device.

Also see this.

查看更多
混吃等死
7楼-- · 2019-03-07 20:27

On Mac Lion :

I just had to go to /path/to/android-sdk/tools and run android adb update for the devices to be detected.

查看更多
登录 后发表回答