Android Studio - ADB 启动服务器失败,adbkey 检查失败 [英] Android Studio - ADB start server fails, adbkey check fails

查看:43
本文介绍了Android Studio - ADB 启动服务器失败,adbkey 检查失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:adb start-server 失败.

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) 

Catalyst:安装平台工具 v27.0.0

Catalyst: Installing platform tools v27.0.0

尝试的解决方案:重启Android Studio,重启电脑,终端手动启动ADB,删除/Users/[username]/.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]:这似乎在 平台工具 (27.0.1) 的最新更新.

这篇关于Android Studio - ADB 启动服务器失败,adbkey 检查失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆