[英]Running android emulator on travis-ci without -no-window option
I'd like to figure out if it will be possible to run the android emulator on travis-ci without -no-window option. 我想弄清楚是否可以在不带-no-window选项的情况下在travis-ci上运行android仿真器。
When I try the example , and remove the -no-window
option, then the android-wait-for-emulator
part of the following code hangs: 当我尝试示例并删除
-no-window
选项时,以下代码的android-wait-for-emulator
部分将挂起:
# Emulator Management: Create, Start and Wait
before_script:
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio &
- android-wait-for-emulator
- adb shell input keyevent 82 &
I'm hoping there is some way to do this, because it appears that Firefox depends on it. 我希望有某种方法可以执行此操作,因为看来Firefox依赖于此。
Perhaps a something like the GUI & Headless browser testing , but for the android emulator? 也许像GUI&Headless浏览器测试之类的东西,但是对于android模拟器?
Without the -no-window
attribute the system needs a Display. 如果没有
-no-window
属性,则系统需要显示。
Maybe you can try to add export DISPLAY=:99.0
in before_script
, as described in http://docs.travis-ci.com/user/gui-and-headless-browsers/ with the xvfb tool. 也许您可以尝试使用xvfb工具在
before_script
添加export DISPLAY=:99.0
,如http://docs.travis-ci.com/user/gui-and-headless-browsers/中所述。
I've tried numerous other system images and command line options, and this is the only thing that works for me so far. 我已经尝试了许多其他系统映像和命令行选项,这是到目前为止对我唯一有效的方法。
- SYS_IMG="system-images;android-21;default;armeabi-v7a"
- echo no | sdkmanager "$SYS_IMG"
- echo no | avdmanager create avd -n acib -k "$SYS_IMG" -f -c 100M -d 0
- emulator @acib -no-window &
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.