android-cts - android-gts 在 ubuntu16.04 上设置 android-gts
问题描述
我尝试在 ubuntu16.04 上设置 andorid-gts。python版本是2.7.16。我已经安装了以下软件包:
pip install future
pip install protobuf
pip install auth
pip install compiler
pip install virtualenv
pip install PyPi
pip install google-cloud-storage
pip install oauth2client
但是当我尝试从控制台运行 gts 命令时,总是出现以下错误:
android Google Mobile Services (GMS) Test Suite 7.0_r3 (6045416)
Use "help" or "help all" to get more information on running commands.
02-06 15:25:34 I/DeviceManager: Detected new device xxxxxxxx
gts-tf > run gts
02-06 15:25:39 I/TestInvocation: Starting invocation for 'gts' with '[ DeviceBuildInfo{bid=6045416, serial=xxxxxxxx} on device 'xxxxxxxx']
02-06 15:25:53 W/BusinessLogicPreparer: Option config-filename isn't set. Using empty string instead.
02-06 15:25:53 W/BusinessLogicPreparer: Option version isn't set. Using 'null' instead.
02-06 15:27:54 W/NativeDevice: TimeoutException () when attempting adb content on device xxxxxxxx
02-06 15:30:04 W/NativeDevice: TimeoutException () when attempting adb content on device xxxxxxxx
02-06 15:32:13 W/NativeDevice: TimeoutException () when attempting adb content on device xxxxxxxx
02-06 15:32:21 W/TestInvocation: Invocation did not complete due to device xxxxxxxx becoming not available. Reason: Attempted adb content multiple times on device xxxxxxxx without communication success. Aborting.
02-06 15:33:02 E/RunCommandTargetPreparer: Skipping command teardown since exception was DeviceNotAvailable
02-06 15:33:02 E/RunCommandTargetPreparer: Skipping command teardown since exception was DeviceNotAvailable
02-06 15:33:02 I/SuiteResultReporter:
============================================
================= Results ==================
=============== Consumed Time ==============
Total aggregated tests run time: 0 ms
=============== Summary ===============
Total Run time: 7m 22s
0/0 modules completed
Total Tests : 0
PASSED : 0
FAILED : 0
============== End of Results ==============
============================================
gts-tf >
我想这可能是由超时日志引起的:
02-06 15:27:54 W/NativeDevice: TimeoutException () when attempting adb content on device xxxxxxxx
解决方案
此错误是由旧的 adb 版本引起的。只需使用来自 android sdk 的 adb 版本就可以了。如果使用sudo apt-get install adb
,则会发生此超时错误。
推荐阅读
- java - android:将我的库从 android 升级到 androidx,但没有找到此类 SlideCallback
- bootstrap-4 - 是否有可能在所有小屏幕设备中使 bootstrap 4 中的额外小类响应
- opengl-4 - OpenGL - MSAA 不支持浮点纹理吗?
- neo4j - 在 Neo4j Graph Data Science 中,我可以使用自定义类型名称通过密码创建图形吗?
- python-3.x - Groupby 并在 Pandas 中打印整个数据框
- next.js - PWA 独立窗口是否有可能具有“保持领先”功能?
- c# - SQL 字符串或普通字符串
- python - 如何检测消费者是否已经在数据框中?
- database - 如何在数据库中删除表?以及如何创建视图表?
- python - 使用 ANN 进行多任务学习?