CircleCI - Android模拟器安装超时

时间:2018-01-24 05:41:12

标签: android emulation circleci

我需要帮助在CircleCI上设置模拟器来测试我的android检测测试。

  general:
    artifacts:
        - /home/ubuntu/buildtest/app/build/outputs/apk/
machine:
    environment:
        ANDROID_HOME: /usr/local/android-sdk-linux

dependencies:
    override:
        - echo y | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-26.0.2,android-26,extra-google-google_play_services
        - chmod +x gradlew
        - ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies

test:

  pre:
      - android list targets
      - echo no | android create avd -n emulatorwithgoogleapi22 -t 12 --tag google_apis
      - echo 'vm.heapSize=512' >> ~/.android/avd/emulatorwithgoogleapi22.ini
      - echo 'hw.ramSize=1024' >> ~/.android/avd/emulatorwithgoogleapi22.ini
      - cat ~/.android/avd/emulatorwithgoogleapi22.ini
      - emulator -avd emulatorwithgoogleapi24 -no-audio -no-window :
          background: true
          parallel: true
      - circle-android wait-for-boot
      - adb shell input keyevent 82
      - adb shell svc power stayon true
      - adb shell settings put global window_animation_scale 0
      - adb shell settings put global transition_animation_scale 0
      - adb shell settings put global animator_duration_scale 0

  override:
    - ./gradlew assembleDebug
    - ./gradlew connectedAndroidTest

  post:
      - cp -r app/build/outputs $CIRCLE_ARTIFACTS
      - cp -r app/build/outputs/androidTest-results/ $CIRCLE_TEST_REPORTS

上面是我用来在服务器上构建的YAML文件。我尝试了各种论坛以前的解决方案,但我仍然卡住了。 救命?

0 个答案:

没有答案