我正在尝试将Android Studio
连接到我的Pixel 2安卓手机。
Android Studio版:
Android Studio 3.0.1
Build #AI-171.4443003, built on November 9, 2017
JRE: 1.8.0_152-release-915-b08 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.11.6
我的Pixel 2有Android 8.1.0
内部版本号OPM1.171019.011
当我将此设备连接到Android Studio时,我得到以下事件日志输出: -
21/12/2017
07:54 Adb connection Error:EOF
07:54 Connection attempts: 1
07:54 Connection attempts: 2
07:54 Connection attempts: 3
07:54 Connection attempts: 4
07:55 Connection attempts: 5
07:55 Connection attempts: 6
07:55 Connection attempts: 7
07:55 Connection attempts: 8
07:55 Connection attempts: 9
07:55 Connection attempts: 10
07:55 Connection attempts: 11
07:55 * daemon not running; starting now at tcp:5037
07:55 ADB server didn't ACK
07:55 Full server startup log: /var/folders/jt/0vbjn9c967jbxl0d9p_x6z78783df6/T//adb.243381702.log
07:55 Server had pid: 1737
07:55 --- adb starting (pid 1737) ---
07:55 adb I 12-21 07:55:07 1737 83688 main.cpp:57] Android Debug Bridge version 1.0.39
07:55 adb I 12-21 07:55:07 1737 83688 main.cpp:57] Version 27.0.0-4455170
07:55 adb I 12-21 07:55:07 1737 83688 main.cpp:57] Installed as /Users/proutylf/Library/Android/sdk/platform-tools/adb
07:55 adb I 12-21 07:55:07 1737 83688 main.cpp:57]
07:55 adb I 12-21 07:55:07 1737 83688 adb_auth_host.cpp:416] adb_auth_init...
07:55 adb I 12-21 07:55:07 1737 83688 adb_auth_host.cpp:174] read_key_file '/Users/proutylf/.android/adbkey'...
07:55 adb F 12-21 07:55:07 1737 83701 transport_usb.cpp:37] Check failed: usb_packet_size < 4096ULL (usb_packet_size=5120, 4096ULL=4096)
07:55 * failed to start daemon
07:55 error: cannot connect to daemon
07:55 '/Users/proutylf/Library/Android/sdk/platform-tools/adb start-server' failed -- run manually if necessary
07:55 adb restart attempts: 1
07:55 Connection attempts: 12
07:55 * daemon not running; starting now at tcp:5037
07:55 ADB server didn't ACK
07:55 Full server startup log: /var/folders/jt/0vbjn9c967jbxl0d9p_x6z78783df6/T//adb.243381702.log
07:55 Server had pid: 1739
日志文件内容如下: -
--- adb starting (pid 1727) ---
adb I 12-21 07:54:19 1727 81771 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 12-21 07:54:19 1727 81771 main.cpp:57] Version 27.0.0-4455170
adb I 12-21 07:54:19 1727 81771 main.cpp:57] Installed as /Users/proutylf/Library/Android/sdk/platform-tools/adb
adb I 12-21 07:54:19 1727 81771 main.cpp:57]
adb I 12-21 07:54:19 1727 81771 adb_auth_host.cpp:416] adb_auth_init...
adb I 12-21 07:54:19 1727 81771 adb_auth_host.cpp:174] read_key_file '/Users/proutylf/.android/adbkey'...
adb F 12-21 07:54:56 1727 83260 transport_usb.cpp:37] Check failed: usb_packet_size < 4096ULL (usb_packet_size=5120, 4096ULL=4096)
--- adb starting (pid 1737) ---
adb I 12-21 07:55:07 1737 83688 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 12-21 07:55:07 1737 83688 main.cpp:57] Version 27.0.0-4455170
adb I 12-21 07:55:07 1737 83688 main.cpp:57] Installed as /Users/proutylf/Library/Android/sdk/platform-tools/adb
adb I 12-21 07:55:07 1737 83688 main.cpp:57]
adb I 12-21 07:55:07 1737 83688 adb_auth_host.cpp:416] adb_auth_init...
adb I 12-21 07:55:07 1737 83688 adb_auth_host.cpp:174] read_key_file '/Users/proutylf/.android/adbkey'...
adb F 12-21 07:55:07 1737 83701 transport_usb.cpp:37] Check failed: usb_packet_size < 4096ULL (usb_packet_size=5120, 4096ULL=4096)
--- adb starting (pid 1739) ---
adb I 12-21 07:55:08 1739 83918 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 12-21 07:55:08 1739 83918 main.cpp:57] Version 27.0.0-4455170
adb I 12-21 07:55:08 1739 83918 main.cpp:57] Installed as /Users/proutylf/Library/Android/sdk/platform-tools/adb
adb I 12-21 07:55:08 1739 83918 main.cpp:57]
adb I 12-21 07:55:08 1739 83918 adb_auth_host.cpp:416] adb_auth_init...
adb I 12-21 07:55:08 1739 83918 adb_auth_host.cpp:174] read_key_file '/Users/proutylf/.android/adbkey'...
adb F 12-21 07:55:08 1739 83951 transport_usb.cpp:37] Check failed: usb_packet_size < 4096ULL (usb_packet_size=5120, 4096ULL=4096)
我安装了buildToolsVersion '27.0.2'
。
我所有的其他Android设备都可以安装到Android Studio,包括我的Pixel XL,它与我的Pixel 2具有相同的Android版本和内部版本号。
如何解决此adb连接问题?
如果有任何帮助,我的adb版本报告为
Android Debug Bridge version 1.0.39
Version 27.0.0-4455170
Installed as /Users/proutylf/Library/Android/sdk/platform-tools/adb
答案 0 :(得分:1)
您使用的是什么平台工具版本?我在像素2上有完全相同的错误。我有平台工具版本27.0.0。我下载了以前的版本,这对我有用。我在这里找到了答案:Android Studio - ADB start server fails, adbkey check fails