Android Studio-ADB启动服务器失败,adbkey检查失败 [英] Android Studio - ADB start server fails, adbkey check fails
问题描述
问题:adb启动服务器失败.
Problem: adb start-server fails.
--- adb starting (pid 1414) ---
adb I 12-05 17:28:30 1414 48453 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 12-05 17:28:30 1414 48453 main.cpp:57] Version 27.0.0-4455170
adb I 12-05 17:28:30 1414 48453 main.cpp:57] Installed as /Users/[username]/Library/Android/sdk/platform-tools/adb
adb I 12-05 17:28:30 1414 48453 main.cpp:57]
adb I 12-05 17:28:30 1414 48453 adb_auth_host.cpp:416]
adb_auth_init...
adb I 12-05 17:28:30 1414 48453 adb_auth_host.cpp:174] read_key_file '/Users/[username]/.android/adbkey'...
adb F 12-05 17:28:30 1414 48466 transport_usb.cpp:37] Check failed: usb_packet_size < 4096ULL (usb_packet_size=5120, 4096ULL=4096)
催化剂:安装平台工具v27.0.0
Catalyst: Installing platform tools v27.0.0
尝试过的解决方案:重新启动Android Studio,重新启动计算机,通过终端手动启动ADB,删除/Users/[用户名]/.android/adbkey和adbkey.pub并重新安装平台工具
Solutions Tried: Restarting Android Studio, Restarting computer, Manually starting ADB via terminal, deleting /Users/[username]/.android/adbkey and adbkey.pub, and reinstalling platform tools
我也不使用genymotion,而只是使用股票模拟器.
Also I am not using genymotion, just the stock emulator.
推荐答案
它是一个错误使用最新版本的平台工具(27.0.0),我发现的解决方案是降级到以前的版本.
It is a bug with the latest version of the platform tools (27.0.0), the solution I found was to downgrade to the previous version.
删除位于android-sdk
目录中的当前platform-tools
目录,然后从此处下载旧版本:
Remove the current platform-tools
directory located in the android-sdk
directory, then download the older version from here:
[更新] :某些用户(包括我自己)已经注意到,该问题仅在插入手机后才会发生,因此,如果您不需要对其进行测试,请尝试拔下它并使用模拟器. 同样值得注意的是,所有报告的设备均来自Google Pixel产品线,因此其他设备可能不会引起此问题.
[Update]: Some users (myself included) have noticed that the issue only happens when your phone is plugged in, so if you don't need to test on it, try to unplug it and use an emulator. Also worths noticing that all reported devices were from the Google Pixel line, so other devices might not cause the issue.
[更新2] :这似乎可以在 查看全文