在构建我的Android应用程序时,我在Travis中遇到了这个错误。
> Could not find com.google.android.gms:play-services-games:8.4.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.jar
file:/usr/local/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.pom
file:/usr/local/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.jar
file:/usr/local/android-sdk/extras/google/m2repository/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.pom
file:/usr/local/android-
sdk/extras/google/m2repository/com/google/android/gms/play-services-games/8.4.0/play-services-games-8.4.0.jar
这是 .travis.yml 文件:
language: android
android:
components:
- tools
- build-tools-23.0.3
- android-23
- extra-google-google_play_services
- sys-img-armeabi-v7a-android-23
- extra-android-m2repository
以下是 build.gradle 文件的内容:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.google.android.gms:play-services-games:8.4.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
看起来Travis应该能够找到Play服务的依赖项。 发生了什么事?