Bitrise:无法解析配置“:classpath”的所有工件无法解析com.google.gms:google-services:4.2.0

Mon*_*ica 1 android gradle bitrise

更新后com.android.tools.build:gradlecom.google.gms:google-services我可以在本地构建项目(命令gradlew build --scan),但Bitrise我收到“构建失败”和消息:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'git'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:4.1.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.1.0.
> Could not get resource 
'http://dl.bintray.com/populov/maven/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'.
> Could not GET 
'http://dl.bintray.com/populov/maven/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'. 
Received status code 502 from server: Bad Gateway
> Could not resolve com.google.gms:google-services:4.2.0.
Required by:
project :
> Could not resolve com.google.gms:google-services:4.2.0.
> Could not get resource 'http://dl.bintray.com/populov/maven/com/google/gms/google- 
services/4.2.0/google-services-4.2.0.pom'.
> Could not GET 'http://dl.bintray.com/populov/maven/com/google/gms/google- 
services/4.2.0/google-services-4.2.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve io.fabric.tools:gradle:1.28.0.
Run Code Online (Sandbox Code Playgroud)

我已经尝试了我找到的所有建议,但我仍然收到此消息。

我的build.gradle档案

buildscript {
repositories {
    maven { url "http://dl.bintray.com/populov/maven" }
    google()
    mavenCentral()
    jcenter()
    maven {
        url 'https://maven.google.com/'
        name 'Google'
    }
    maven { url 'https://dl.bintray.com/android/android-tools' }
    maven { url 'https://maven.fabric.io/public' }
    maven {
        url 'https://google.bintray.com/exoplayer/'
    }
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.0'
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'io.fabric.tools:gradle:1.28.0'
    classpath "me.tatarka:gradle-retrolambda:3.7.1'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}
allprojects {
repositories {
    maven { url "http://dl.bintray.com/populov/maven" }
    mavenCentral()
    jcenter()
    maven {
        url "https://maven.google.com/"
        name 'Google'
    }
    maven { url "https://dl.bintray.com/android/android-tools" }
    maven { url "https://maven.fabric.io/public" }
    maven {
        url "https://google.bintray.com/exoplayer/"
    }
}
}
Run Code Online (Sandbox Code Playgroud)

gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Run Code Online (Sandbox Code Playgroud)

小智 6

目前好像jcenter已经下线了。(参见https://jcenter.bintray.com/

您可以等待 jcenter 启动或迁移以使用其他内容: https: //developer.android.com/studio/build/jcenter-migration