首页 > 解决方案 > 无法获取“https://google.bintray.com/flexbox-layout/com/google/android/flexbox/1.0.0/flexbox-1.0.0.pom”

问题描述

我正在使用 CometChat 和 ChatKit 构建聊天应用程序。当我在我的 Android 手机中执行该应用程序时,会出现错误消息:“ Could not GET 'https://google.bintray.com/flexbox-layout/com/google/android/flexbox/1.0.0/flexbox-1.0. 0.pom'. 从服务器收到状态码 403: Forbidden Disable Gradle 'offline mode' and sync project "

下面是我的 Build Gradle 项目代码:

buildscript {
    repositories {
        google()
        mavenCentral()
        mavenLocal()
        maven { url "https://google.bintray.com/flexbox-layout" }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.2.2"
        classpath 'com.google.gms:google-services:4.3.8'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        mavenLocal()
        //jCenter()
        maven {
            url "https://dl.cloudsmith.io/public/cometchat/cometchat-pro-android/maven/"
        }
        maven { url 'https://jitpack.io' }
        // Warning: this repository is going to shut down soon

        maven { url "https://google.bintray.com/flexbox-layout" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir

标签: androiddependencies

解决方案


如此处所述,如您所见,bintray 已关闭。您应该搜索部署了 flexbox-layout 的 repo。


推荐阅读