本文介绍了运行 adb 命令时出现错误 3221226356的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Android ADB 时发现了一个问题.本质上,在 Windows 10 机器上,如果我在命令行运行:

I have started seeing a problem when using the Android ADB. Essentially, on a Windows 10 machine, if I run at the command line:

adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk

然后应用程序运行并报告 28(这是正确的),但随后显示 Windows 对话框报告 adb.exe 已停止工作.

Then the application runs and reports 28 (which is correct), but then Windows dialog box is displayed reporting that adb.exe has stopped working.

运行 Appium 服务器并尝试连接到模拟器也会抛出错误:

Running the Appium server and attempting to connect to the emulator also throws an error:

adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' exited with code 3221226356'; Stderr: ''; Code: '3221226356'

通过一定量的谷歌搜索,我认为这两个问题是相关的.

By doing a certain amount of Googling, I think that the two problems are related.

提出的一个建议是重新安装旧版本的 adb,但我不知道如何执行此操作.有人知道吗?

One suggestion made is to re-install an older version of adb, but I can't work out how to do this. Does anyone know?

或者,有谁知道是什么导致了这个问题以及如何解决它?这是我的环境:

Alternatively, does anyone know what is causing this problem and how it can be fixed? Here's my environment:

Windows 10 Pro (1809)
Android Studio 3.4.1
Android Debug Bridge version 1.0.41
Version 29.0.0-5611747

我应该补充一点,我曾经能够运行 adb 但最近,我安装了一个更新的 Android API,这样做时,我被提示(我认为)更新 adb 和硬件加速.显然这可能是相关的,但我不知道如何取消更新.

I should add that I used to be able to run adb but very recently, I installed an update Android API and in doing so, I was prompted to (I think) update adb and hardware acceleration. Obviously this may be related, but I can't work out how to back out the update.

推荐答案

我刚刚遇到了这个错误并做了一些研究.看起来这个错误是由与 Appium (1.13.0) 不兼容的 adb.exe 版本 (29.0.1-5644136) 引起的.将adb.exeAdbWinApi.dllAdbWinUsbApi.dll替换为之前的版本即可解决问题.

I've just faced this error and made some research. Looks like this error is caused by incompatible adb.exe version (29.0.1-5644136) with Appium (1.13.0). Replacing adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll with previous version solved the problem.

我调用终端 adb version 来检查我的 adb 版本.

I called in terminal adb version to check what's my adb version.

Android Debug Bridge version 1.0.41
Version 29.0.1-5644136

我用以前的版本替换了它,它起作用了!更换后我有:

I replaced it with the previous version and it worked! After replace I had:

Android Debug Bridge version 1.0.41
Version 28.0.3-5475833

我把这个版本上传到 github 以防你可以自己尝试

I uploaded this version to github in case You could try it Yourself

https://github.com/sephuxeresh/adb_versions/tree/master/1.0.41/28.0.3-5475833

这篇关于运行 adb 命令时出现错误 3221226356的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 04:55