Travis CI:由于Android模拟器配置而导致生成错误

时间:2019-05-01 13:05:14

标签: android travis-ci

我在Travis CI中为我的android应用生成此错误:

  

命令“ echo no | android create avd --force -n test -t   android-28 --abi armeabi-v8a -c 100M“失败,并在执行过程中以1退出   

我的travis文件:

language: android
sudo: required
jdk: oraclejdk8
android:
  components:
    - tools
    - tools
    - platform-tools
    - build-tools-28.0.3
    - android-28
    - android-28
    - add-on
    - extra
before_install:
    - yes | sdkmanager "platforms;android-28"
    - mkdir "$ANDROID_HOME/licenses" || true
    - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"
    - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license"
    - echo no | android create avd --force -n test -t android-28 --abi armeabi-v8a -c 100M
    - emulator -avd test -no-audio -no-window &
    - android-wait-for-emulator
    - adb shell input keyevent 82 &
    - ./gradlew dependencies || true
before_script:
    - echo no | android create avd --force -n test -t android-28 --abi armeabi-v8a
    - emulator -avd test -no-skin -no-audio -no-window &   
    - android-wait-for-emulator
    - adb shell input keyevent 82 &
script:
    - ./gradlew build connectedCheck
    - "./gradlew clean build connectedCheck -PdisablePreDex --stacktrace"
before_cache:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/
    - $HOME/.android/build-cache
cache:
    directories:
        -$HOME/.gradle/caches/
        -$HOME/.gradle/wrapper/s

有什么建议吗?

0 个答案:

没有答案