如何在 CircleCI 上安装 Google Play Services GMS SDK
How to Install Google Play Services GMS SDK on CircleCI
我正在使用 CircleCI 服务器来构建和测试 Android 应用程序,但在为 Google Play 服务(包括 GMS 服务)安装 Android SDK 时遇到问题在服务器上。
我的 circle.yml 文件是:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
dependencies:
pre:
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all
- wget $DEBUG_KEYSTORE_URL
- openssl des3 -d -pass env:DEBUG_KEYSTORE_PASSWORD -salt -in debug.keystore.encrypted -out ~/.android/debug.keystore
test:
override:
- ./gradlew assembleDebug
post:
- cp -r app/build/outputs $CIRCLE_ARTIFACTS
第一个
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository
是对 Android SDK extras 早期问题的修复,我认为第二行将安装所有剩余组件:
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all
但是,我收到以下错误(如下)。
在尝试使用最新的 Android SDK 使我的 circle.yml 文件保持最新时,我似乎使 运行 陷入类似的问题。任何建议表示赞赏!
Download https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.0-beta1/gradle-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.0-beta1/gradle-core-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder/1.3.0-beta1/builder-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.0-beta1/lint-24.3.0-beta1.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.2.1/proguard-parent-5.2.1.pom
Download https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.3.6/groovy-all-2.3.6.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/1.3.0-beta1/builder-model-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/1.3.0-beta1/builder-test-api-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/sdklib/24.3.0-beta1/sdklib-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/sdk-common/24.3.0-beta1/sdk-common-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/common/24.3.0-beta1/common-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/24.3.0-beta1/manifest-merger-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/24.3.0-beta1/ddmlib-24.3.0-beta1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.pom
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/24.3.0-beta1/lint-checks-24.3.0-beta1.pom
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/24.3.0-beta1/annotations-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/24.3.0-beta1/layoutlib-api-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/dvlib/24.3.0-beta1/dvlib-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/24.3.0-beta1/lint-api-24.3.0-beta1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.pom
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.0-beta1/gradle-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.0-beta1/gradle-core-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder/1.3.0-beta1/builder-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.0-beta1/lint-24.3.0-beta1.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar
Download https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.3.6/groovy-all-2.3.6.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/1.3.0-beta1/builder-model-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/1.3.0-beta1/builder-test-api-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/sdklib/24.3.0-beta1/sdklib-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/sdk-common/24.3.0-beta1/sdk-common-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/common/24.3.0-beta1/common-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/24.3.0-beta1/manifest-merger-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/24.3.0-beta1/ddmlib-24.3.0-beta1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.jar
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/24.3.0-beta1/lint-checks-24.3.0-beta1.jar
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar
Download https://jcenter.bintray.com/com/android/tools/annotations/24.3.0-beta1/annotations-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/24.3.0-beta1/layoutlib-api-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/dvlib/24.3.0-beta1/dvlib-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/24.3.0-beta1/lint-api-24.3.0-beta1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.jar
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.google.android.gms:play-services-maps:7.5.0.
Searched in the following locations:
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
Required by:
project-android-app:app:unspecified
> Could not find com.google.android.gms:play-services-location:7.5.0.
Searched in the following locations:
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
Required by:
project-android-app:app:unspecified
> Could not find com.google.android.gms:play-services-gcm:7.5.0.
Searched in the following locations:
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
Required by:
project-android-app:app:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
export TERM="dumb"
./gradlew dependencies
returned exit code 1
Total time: 19.331 secs Action failed: ./gradlew dependencies
多次调整后的解决方案似乎需要您在 --filter
选项中明确指定所需的组件。如果您不添加过滤器,--all
似乎不会为您提供所需的所有组件。
其他人的修复如下:
ssh
dependencies:
pre:
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository
我遇到了同样的错误:
失败:构建失败,出现异常。
* 什么地方出了错:
配置根项目时出现问题 'android'。
Could not resolve all dependencies for configuration ':_debugCompile'.
Could not find com.google.android.gms:play-services-location:7.5.0.
下面的提示解决了问题:
echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository
我正在使用 CircleCI 服务器来构建和测试 Android 应用程序,但在为 Google Play 服务(包括 GMS 服务)安装 Android SDK 时遇到问题在服务器上。
我的 circle.yml 文件是:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
dependencies:
pre:
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all
- wget $DEBUG_KEYSTORE_URL
- openssl des3 -d -pass env:DEBUG_KEYSTORE_PASSWORD -salt -in debug.keystore.encrypted -out ~/.android/debug.keystore
test:
override:
- ./gradlew assembleDebug
post:
- cp -r app/build/outputs $CIRCLE_ARTIFACTS
第一个
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository
是对 Android SDK extras 早期问题的修复,我认为第二行将安装所有剩余组件:
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all
但是,我收到以下错误(如下)。
在尝试使用最新的 Android SDK 使我的 circle.yml 文件保持最新时,我似乎使 运行 陷入类似的问题。任何建议表示赞赏!
Download https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.0-beta1/gradle-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.0-beta1/gradle-core-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder/1.3.0-beta1/builder-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.0-beta1/lint-24.3.0-beta1.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.2.1/proguard-parent-5.2.1.pom
Download https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.3.6/groovy-all-2.3.6.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/1.3.0-beta1/builder-model-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/1.3.0-beta1/builder-test-api-1.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/sdklib/24.3.0-beta1/sdklib-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/sdk-common/24.3.0-beta1/sdk-common-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/common/24.3.0-beta1/common-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/24.3.0-beta1/manifest-merger-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/24.3.0-beta1/ddmlib-24.3.0-beta1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.pom
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/24.3.0-beta1/lint-checks-24.3.0-beta1.pom
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/24.3.0-beta1/annotations-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/24.3.0-beta1/layoutlib-api-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/dvlib/24.3.0-beta1/dvlib-24.3.0-beta1.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/24.3.0-beta1/lint-api-24.3.0-beta1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.pom
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle/1.3.0-beta1/gradle-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.0-beta1/gradle-core-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder/1.3.0-beta1/builder-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.0-beta1/lint-24.3.0-beta1.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar
Download https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.3.6/groovy-all-2.3.6.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/1.3.0-beta1/builder-model-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/1.3.0-beta1/builder-test-api-1.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/sdklib/24.3.0-beta1/sdklib-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/sdk-common/24.3.0-beta1/sdk-common-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/common/24.3.0-beta1/common-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/24.3.0-beta1/manifest-merger-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/24.3.0-beta1/ddmlib-24.3.0-beta1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.jar
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/24.3.0-beta1/lint-checks-24.3.0-beta1.jar
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar
Download https://jcenter.bintray.com/com/android/tools/annotations/24.3.0-beta1/annotations-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/24.3.0-beta1/layoutlib-api-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/dvlib/24.3.0-beta1/dvlib-24.3.0-beta1.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/24.3.0-beta1/lint-api-24.3.0-beta1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.jar
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.google.android.gms:play-services-maps:7.5.0.
Searched in the following locations:
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-maps/7.5.0/play-services-maps-7.5.0.jar
Required by:
project-android-app:app:unspecified
> Could not find com.google.android.gms:play-services-location:7.5.0.
Searched in the following locations:
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-location/7.5.0/play-services-location-7.5.0.jar
Required by:
project-android-app:app:unspecified
> Could not find com.google.android.gms:play-services-gcm:7.5.0.
Searched in the following locations:
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
http://dl.bintray.com/populov/maven/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
https://maven.fabric.io/public/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/android/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.pom
file:/usr/local/android-sdk-linux/extras/google/m2repository/com/google/android/gms/play-services-gcm/7.5.0/play-services-gcm-7.5.0.jar
Required by:
project-android-app:app:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
export TERM="dumb"
./gradlew dependencies
returned exit code 1
Total time: 19.331 secs Action failed: ./gradlew dependencies
多次调整后的解决方案似乎需要您在 --filter
选项中明确指定所需的组件。如果您不添加过滤器,--all
似乎不会为您提供所需的所有组件。
其他人的修复如下:
ssh
dependencies:
pre:
- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository
我遇到了同样的错误: 失败:构建失败,出现异常。 * 什么地方出了错: 配置根项目时出现问题 'android'。
Could not resolve all dependencies for configuration ':_debugCompile'. Could not find com.google.android.gms:play-services-location:7.5.0.
下面的提示解决了问题:
echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all --filter extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository