gpt4 book ai didi

android - mavenCentral() 不工作,而不是 jcenter()

转载 作者:行者123 更新时间:2023-12-04 12:21:38 51 4
gpt4 key购买 nike

mavenCentral() 不工作,而不是 jcenter()。当我使用 mavenCentral() 时,我收到以下错误消息,

Could not HEAD 'https://google.bintray.com/flexbox-layout/com/google/android/flexbox/2.0.1/flexbox-2.0.1.pom'. Received status code 403 from server: Forbidden
Disable Gradle 'offline mode' and sync project
使用上面的 jcenter() 错误不会出现。

Can I use jcenter() in my project even after jcenter() is deprecated. What is the last date of jcenter() to be use in our project.


项目 build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.3'
classpath 'com.google.gms:google-services:4.3.8'
//classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.24.4"
}
}

allprojects {
/*apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'*/

repositories {
google()
mavenCentral()
}
}
模块 build.gradle
apply plugin: 'com.android.application'

android {
compileSdkVersion 30
defaultConfig {
applicationId "io.kommunicate.app"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

//Sensitive data
}

buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

allprojects {
repositories {
google()
mavenCentral()
//jcenter()
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//api project(':kommunicateui')
implementation 'io.kommunicate.sdk:kommunicateui:2.1.8'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.multidex:multidex:2.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

apply plugin: 'com.google.gms.google-services'

最佳答案

没有flexbox在 Maven 中心。有一个flexboxGoogle's Maven repo , 但仅限 3.0.0 .你的一些传递依赖正在寻找 2.0.1。并且,根据该依赖列表,它必须是 io.kommunicate.sdk:kommunicateui:2.1.8正在寻找较旧的 flexbox .
不幸的是,io.kommunicate.sdk:kommunicateui 的开发者显然没有更新他们的图书馆。
您可以尝试在 com.google.android.flexbox:flexbox:3.0.0 上手动添加自己的依赖项。或许设置一个exclude规则 io.kommunicate.sdk:kommunicateui:2.1.8依赖告诉 Gradle 忽略它对 flexbox 的传递依赖.理想情况下,io.kommunicate.sdk:kommunicateui 的开发人员将更新他们的库以依赖 com.google.android.flexbox:flexbox:3.0.0 .
要排除失败的依赖项,请更改:

implementation 'io.kommunicate.sdk:kommunicateui:2.1.8'
至:
implementation('io.kommunicate.sdk:kommunicateui:2.1.8') {
exclude group: "com.google.android", module: "flexbox"
}

关于android - mavenCentral() 不工作,而不是 jcenter(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68891571/

51 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com