macos 无法将 Nexus S 连接到我的 Mac OS x Lion 10.7 以进行 USB 调试
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7168131/
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
Can't connect Nexus S to my Mac OS x Lion 10.7 for USB Debugging
提问by Do Nguyen
I tried to connect my Nexus S (Android version 2.3.5) to my macbook pro 10.7 (OSX Lion). However, the notification on android phone was just ON and OFF alternative. I tried this command on my terminal.
我试图将我的 Nexus S(Android 版本 2.3.5)连接到我的 macbook pro 10.7(OSX Lion)。但是,Android 手机上的通知只是 ON 和 OFF 选择。我在我的终端上尝试了这个命令。
adb usb
>>error: device not found
adb devices
>>List of devices attached
>>[ nothing here ]
Please help me with this issue. Thank you!
请帮我解决这个问题。谢谢!
回答by ZaBlanc
Make sure you don't have a power-only USB cable. If the phone charges but Mac doesn't think it's there, it's a sure sign.
确保您没有仅使用电源的 USB 电缆。如果手机充电,但 Mac 认为它不在那里,这是一个确定的迹象。
回答by Rajiv Makhijani
Also, if that does not work, check to see if the device shows up under USB in the System Profiler (included in OS X). If it is showing up there, but not in ADB, try adding the USB Vendor ID of the phone to ~/.android/adb_usb.ini
此外,如果这不起作用,请检查该设备是否显示在 System Profiler(包含在 OS X 中)的 USB 下。如果它出现在那里,但不在 ADB 中,请尝试将手机的 USB 供应商 ID 添加到 ~/.android/adb_usb.ini
This file can be created if it does not already exist. The Vendor ID of the Nexus S is 0x18d1. Please make sure the last line of the file is a Vendor ID, do not leave a blank line at the end.
如果该文件尚不存在,则可以创建该文件。Nexus S 的供应商 ID 为 0x18d1。请确保文件的最后一行是供应商 ID,不要在末尾留空行。
回答by Lukas Knuth
It seams that there are some problems with debugging an Android device on OS X (most describe this problem after updating to Lion).
看来在 OS X 上调试 Android 设备存在一些问题(大多数人在更新到 Lion 后描述了这个问题)。
There are some threads/discussions which offer a few possible workarounds, see if one of them works for you:
有一些线程/讨论提供了一些可能的解决方法,看看其中一个是否适合您:
Although, this seams to be a problem on Google / Apples site so you can only check if you can work it around.
虽然,这在 Google/Apples 网站上似乎是一个问题,因此您只能检查是否可以解决。
回答by 8kpx
I had same problem with my N-06C which is made by NEC and solve by writing code less kext.
我的 N-06C 有同样的问题,它是由 NEC 制造的,通过编写更少的 kext 代码来解决。
http://8kpxen.blogspot.com/2011/08/how-to-adb-to-your-android-device-on.html
http://8kpxen.blogspot.com/2011/08/how-to-adb-to-your-android-device-on.html
Please read this blog and download kext. Since this kext file is configured for N-06C, please modify for your environment.
请阅读此博客并下载 kext。由于此kext 文件是为N-06C 配置的,请根据您的环境进行修改。
回答by Oh Danny Boy
This happened to me, checked ADB in Eclipse, and was able to select and push file to device. Pushed APK and installed.
这发生在我身上,在 Eclipse 中检查了 ADB,并且能够选择文件并将其推送到设备。推送APK并安装。
I know, horrible solution but Lion has been a nightmare for most developers. Hopefully the updates keep comin!
我知道,可怕的解决方案,但对于大多数开发人员来说,Lion 一直是一场噩梦。希望更新不断!
回答by daniel
I have a similar issue. I can issue commands via ./adb shell like ls, but not push and pull, and when i do ./adb devices, it shows my device id, but when i start an interactive shell, adb devices shows nothing. i can still list files in the interactive shell, but still no push or pull.
我有一个类似的问题。我可以像 ls 一样通过 ./adb shell 发出命令,但不能推送和拉取,当我执行 ./adb devices 时,它会显示我的设备 ID,但是当我启动交互式 shell 时,adb devices 什么也不显示。我仍然可以在交互式 shell 中列出文件,但仍然无法推或拉。