gpt4 book ai didi

Android UI 测试 : "adb shell uiautomator" throws error, "uiautomator"在 "adb shell"工作

转载 作者:行者123 更新时间:2023-11-30 02:50:13 27 4
gpt4 key购买 nike

我想在 Windows 上仅使用命令行工具编译和运行 Android UI 黑盒测试。我编写了一个 UiAutomatorTestCase,构建它,并将其上传到 /data/local/tmp/。我确认 jar 文件已复制到后一个目录中。

如果我输入

adb shell

然后输入

uiautomator runtest MyTest.jar –c com.example.MyTest 

在 adb shell 提示符下,测试运行成功。到目前为止一切顺利。

问题是如果我结合这两个步骤并输入

adb shell uiautomator runtest MyTest.jar –c com.example.MyTest

然后我得到以下错误:

Error: /data/local/tmp/ľc does not exist

根据documentation ,这应该有效。该错误在 Windows 7 Pro 32 位 HUN 和 Windows 8.1 Pro 64 位 ENG 上相同。该设备是三星 Galaxy S3 Mini (GT-I8190),运行 Android 4.1.2(API 级别 16)。

我做错了什么?

最佳答案

我强烈认为,

adb shell
$ <command>
adb shell <command> 相同.在这方面我从未遇到过任何差异。

请尝试 adb kill-serveradb start-server

也请尝试 adb -s <device_id> shell <command>你可以找到<device_id>来自 adb devices

您能否也告诉我们 adb version 的输出是什么? ?

关于Android UI 测试 : "adb shell uiautomator" throws error, "uiautomator"在 "adb shell"工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24327633/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com