在Travis CI上运行Detox Android

问题描述

我想知道是否有特定的事情可以使Detox在Travis CI的仿真器中运行。

我正在配置Detox的React Native项目中,一切都在我的本地机器(iOS和Android)上正常工作。但是,每次我在CI上启动Android作业时,它都会失败...成功运行测试套件的iOS没有问题。

我尝试了不同版本的模拟器,最终成功启动了模拟器(用于测试的Android 22和28),但是现在我总是遇到以下错误,这些错误似乎在启动{{ 1}}命令。 排毒配置文件中的detox test名称与用于在CI中创建仿真器的名称相同,因此我不理解错误,并且可以在日志中看到仿真器已准备就绪...

avdName

我的detox[8418] ERROR: [exec.js/EXEC_FAIL,#1] ""/usr/local/android-sdk/tools/emulator" -version" failed with code = 1,stdout and stderr: detox[8418] ERROR: [exec.js/EXEC_FAIL,#1] emulator: ERROR: No AVD specified. Use '@foo' or '-avd foo' to launch a virtual device named 'foo' detox[8418] ERROR: [exec.js/EXEC_FAIL,#1] detox[8418] ERROR: [EmulatorVersionResolver.js/EMU_BIN_VERSION_DETECT] Could not detect emulator binary version { ChildProcessError: Command failed: "/usr/local/android-sdk/tools/emulator" -version `"/usr/local/android-sdk/tools/emulator" -version` (exited with error code 1) at callback (/home/travis/build/tsyirvo/react-native-starter/node_modules/child-process-promise/lib/index.js:33:27) at ChildProcess.exithandler (child_process.js:301:5) at ChildProcess.emit (events.js:198:13) at maybeClose (internal/child_process.js:982:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) name: 'ChildProcessError',code: 1,childProcess: { ChildProcess: { [Function: ChildProcess] super_: [Function] },fork: [Function: fork],_forkChild: [Function: _forkChild],exec: [Function: exec],execFile: [Function: execFile],spawn: [Function: spawn],spawnSync: [Function: spawnSync],execFileSync: [Function: execFileSync],execSync: [Function: execSync] },stdout: 'emulator: ERROR: No AVD specified. Use \'@foo\' or \'-avd foo\' to launch a virtual device named \'foo\'\n\n',stderr: '' } detox[8418] WARN: [EmulatorDriver.js/EMU_SKIN_CFG_PATCH] Failed to detect emulator version! (see previous logs) This leaves Detox unable to tell if it should automatically apply this patch-fix: https://stackoverflow.com/a/47265664/453052,which seems to be needed in emulator versions < 28. If you feel this is not needed,you can either ignore this message,or otherwise apply the patch manually. detox[8418] ERROR: Error: No instrumentation runner found on device emulator-5554 for package com.rnstarter 看起来像这样:

.travis.yml

我在配置中错过了什么吗?

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...