eclipse Android adb (OSX Lion) 无法识别 Galaxy Nexus、Jelly Bean
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12277339/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android adb (OSX Lion) does not recognize Galaxy Nexus, Jelly Bean
提问by Adam Matan
I've been developing my first android apps on Eclipse installed on OSX Lion. I would like to use my Jelly Beans Galaxy Nexus for debugging, but the Android Device Bridge (adb)can't find the device:
我一直在安装在 OSX Lion 上的 Eclipse 上开发我的第一个 android 应用程序。我想使用我的 Jelly Beans Galaxy Nexus 进行调试,但Android Device Bridge (adb)找不到该设备:
./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
- The phone is in debugging mode.
- The phone is recognizable as a camera (PTP), but not as a media device (MTP). ADB does not work regardless of PTP\MTP setting.
- I have restarted noth the phone and the mac
- Following this advice, I've installed Android File Transfer. The ATF recognizes the device, but no luck with the ADB.
- 手机处于调试模式。
- 手机可识别为相机 (PTP),但不能识别为媒体设备 (MTP)。无论 PTP\MTP 设置如何,ADB 都不起作用。
- 我没有重新启动手机和 mac
- 按照这个建议,我已经安装了Android File Transfer。ATF 可以识别该设备,但 ADB 不走运。
Any ideas?
有任何想法吗?
Addendum:I have reported a bugfor this. Workarounds are still most welcome!
附录:我为此报告了一个错误。解决方法仍然是最受欢迎的!
Sep 5 13:28 UTC - Workaround #1: Dropbox:I've moved the OSX Eclipse workspace to Dropbox and installed Dropbox on the device. The APK is written to bin/
, and I re-install it from the Dropbox app after each successful build.
UTC 时间 9 月 5 日 13:28 - 解决方法 #1:Dropbox:我已将 OSX Eclipse 工作区移至 Dropbox 并在设备上安装了 Dropbox。APK 被写入bin/
,每次成功构建后,我都会从 Dropbox 应用程序重新安装它。
回答by RyanInBinary
I'm answering this because my boss just had the exact same issue with his Galaxy Nexus, and we finally fixed it yesterday. He had an application, "EasyTether" that was snagging his connection to ADB and it couldn't be used anywhere else. Is it possible that you've setup this application, or a similar one that might be using ADB for you? If "Android File Transfer" works (it was working in parallel with EasyTether for my boss), then your connection is active, so as long as "USB Debugging" is enabled in your settings, you should be seeing a connection. Here's a quick how-to in the event that you do have "easytether"
我回答这个问题是因为我的老板刚刚在他的 Galaxy Nexus 上遇到了完全相同的问题,我们昨天终于修复了它。他有一个应用程序“EasyTether”,该应用程序阻碍了他与 ADB 的连接,并且无法在其他任何地方使用。您是否已经设置了此应用程序,或可能为您使用 ADB 的类似应用程序?如果“Android 文件传输”有效(它与我老板的 EasyTether 并行工作),那么您的连接处于活动状态,因此只要在您的设置中启用了“USB 调试”,您就应该看到连接。如果您确实有“easytether”,这里有一个快速的操作方法
BEFOREyou plug your phone in run the following in terminal
在您插入手机之前,请在终端中运行以下命令
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
If that fixes the issue, and you want to remove easytether altogether, you can us the rm
command with the -rf
flags to keep it from happening again...
如果这解决了问题,并且您想完全删除easytether,您可以rm
使用带有-rf
标志的命令来防止它再次发生......
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext
sudo rm -rf /System/Library/Extensions/EasyTetherUSBEthernet.kext
回答by nandeesh
回答by Warpzit
- Try taking the usb stick out of the phone and put it back
- Try taking it out of the mac and put it back
- Try to put the stick in another port
- Try to wriggle the stick so you are sure it is connected.
- 尝试将 U 盘从手机中取出并放回原处
- 尝试将其从 mac 中取出并放回原处
- 尝试将棒放在另一个端口
- 尝试扭动摇杆,以确保它已连接。
There is a long discussion with possible solutions here: Can't find android device using "adb devices" command
这里有一个关于可能的解决方案的长时间讨论:Can't find android device using "adb devices" command
回答by Dean
Have you tried a different cable? I ordered a bunch of cheap cables off of eBay, and the first one I used would not work for adb. It did work for charging and file transfers however.
您是否尝试过不同的电缆?我从 eBay 订购了一堆便宜的电缆,我使用的第一个电缆不适用于 adb。然而,它确实适用于收费和文件传输。