TravisCI Android 构建失败

TravisCI Android build fails

我尝试 运行 我的配置但失败了。

这是我的配置:

language: android
jdk: oraclejdk8
env:
  matrix:
   - ANDROID_TARGET=android-22  ANDROID_ABI=armeabi-v7a
android:
  components:
    - build-tools-21.1.2
    - android-22
    - sys-img-armeabi-v7a-android-22
    - extra

# Emulator Management: Create, Start and Wait
before_script:
  - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
  - emulator -avd test -no-skin -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script: cd MVVM-Example && ./gradlew app:connectAndroidTest -PdisablePreDex

https://github.com/AHarazim/android-mvvm-example/blob/devTravisCi/.travis.yml

在这里你可以看到输出:

https://travis-ci.org/AHarazim/android-mvvm-example

构建失败,出现异常。

我也尝试 运行 使用

构建
./gradlew app:connectAndroidTest --info

但也不例外

当我尝试 运行 和

./gradlew app:connectAndroidTest --debug

我得到:

The log length has exceeded the limit of 4 Megabytes (this usually means that test suite is raising the same exception over and over).
The build has been terminated.

有没有什么神技可以看log或者看是什么问题?

正在进行大量构建脚本下载日志记录。 尝试将以下内容添加到您的 .yml 文件中:

env:
  global:
  - TERM=dumb

这应该会缩小这些日志,并有助于将它们控制在限制范围内。