我正在尝试在Travis CI上运行API> = 23的模拟器,到目前为止我还没有运气。这是我的配置文件:
before_install:
- pip install --user codecov
# Install SDK license so Android Gradle plugin can install deps.
- mkdir "$ANDROID_HOME/licenses" || true
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" > "$ANDROID_HOME/licenses/android-sdk-license"
# Install the rest of tools (e.g., avdmanager)
- sdkmanager tools
# Install the system image
- sdkmanager "system-images;android-25;google_apis;armeabi-v7a"
# Create and start emulator for the script. Meant to race the install task.
- echo no | avdmanager create avd --force -n test -k "system-images;android-25;google_apis;armeabi-v7a"
- $ANDROID_HOME/emulator/emulator -avd test -no-skin -no-audio -no-window &
install: ./gradlew clean assemble assembleAndroidTest --stacktrace
before_script:
- android-wait-for-emulator
- adb shell input keyevent 82
script: ./gradlew check connectedCheck --stacktrace
env:
global:
- ADB_INSTALL_TIMEOUT=8 # minutes (2 minutes by default)
在构建时,我遇到以下异常:
com.android.builder.testing.ConnectedDevice> runTests [试验(AVD)] 失败
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException:无法建立会话
在com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:144)
[未定义消息]
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException:无法建立会话
有没有人能够使用模拟器> = 23?
运行Travis答案 0 :(得分:0)
尝试添加
errorlevel