Как установить SDK Google Play Services на CircleCI

Я использую сервер CircleCI для сборки и тестирования и приложения для Android и не могу установить Android SDK для сервисов Google Play (включая службы GMS) на сервере.

Мой файл 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, и я подумал, что вторая строка установит все остальные компоненты:

- echo y | sudo /usr/local/android-sdk-linux/tools/android update sdk --no-ui --all

Однако, я получаю следующую ошибку (ниже).

При попытке сохранить мой файл circle.yml в актуальном состоянии с последним Android SDK, я, похоже, сталкиваюсь с аналогичными проблемами. Любые предложения приветствуются!

 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

Я получил ту же ошибку: FAILURE: Сбой сборки с исключением. * Что пошло не так: возникла проблема с настройкой корневого проекта «андроид».

Не удалось разрешить все зависимости для конфигурации: _debugCompile. Не удалось найти 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