0

数時間苦労して私はドッカーコンテナをセットアップできました。マイYMLファイルは以下の通りです:Bitbucket-Pipelines android build setupが失敗します

image: mingc/android-build-box:latest 

pipelines: 
    default: 
    - step: 
     script: 
      # Grab the Android Support Repo which isn't included in the container 
      - echo y | android update sdk --filter "extra-android-m2repository" --no-ui -a 
      # Accept preview licences 
      - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_SDK_HOME/licenses/android-sdk-preview-license" 
      - ./gradlew assembleDebug --info 

しかし、私は「com.google.android.gms:プレイ・サービス・場所:11.0.2」を使用する場合、私はこのエラーを受信して​​しまう私のbild.gradleファイルの中を:

FAILURE: Build failed with an exception. * What went wrong: Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.google.android.gms:play-services-location:11.0.2. Searched in the following locations: file:/opt/android-sdk/extras/m2repository/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom file:/opt/android-sdk/extras/m2repository/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar file:/opt/android-sdk/extras/google/m2repository/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom file:/opt/android-sdk/extras/google/m2repository/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar file:/opt/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom file:/opt/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar https://jcenter.bintray.com/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom https://jcenter.bintray.com/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar https://jitpack.io/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom https://jitpack.io/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.pom https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services-location/11.0.2/play-services-location-11.0.2.jar Required by: project :app > project :sdk

ご協力いただきまして誠にありがとうございます。

+0

助けてください!!!! –

答えて

0

これを試してみてください。それは私のためにうまくいきます。

image: mingc/android-build-box:latest 

pipelines: 
    default: 
    - step: 
     script: 
     - chmod +x gradlew 
     - ./gradlew assemble 
0

gmsのライブラリを使用しているためだと思いますが、gradleスクリプトにはGoogleのメイキングレポは含まれていません。

Googleは、プロジェクトに追加することができ、自分のレポ(https://developer.android.com/studio/build/dependencies.html#google-maven),youを発表した。

あなたはアンドロイドのGradleプラグイン3.0)または

maven { url "https://maven.google.com" } を使用している場合は、親切にあなたのbuild.gradleをチェックして、 google()を(追加してください。 セクション

allprojects { repositories { ... } }

に。

ほとんどの場合、小さなアンドロイドのsdkドッカーがCIパイプライン用に十分です。おそらく、https://hub.docker.com/r/zhywang/android-sdk/を試すことができます。ちょうど〜700MBで、ダウンロードにかかる時間が大幅に短縮されます。

関連する問題