无法得到'https://jcenter.bintray.com/com/android/tools/build/gradle/4.0.0/gradle-4.0.0.pom'



我尝试了我能想到的一切,但我一直收到这个错误。这是我的渐变版本:

buildscript {
repositories {
jcenter()
maven{ url "https://dl.bintray.com/android/android-tools" }
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.0"
classpath 'com.google.gms.google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven{url 'https://www.google.com/'}
maven { url "https://dl.bintray.com/android/android-tools" }
}
}

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

apply plugin: 'com.android.application'

android{compileSdk版本30buildToolsVersion;30.0.0〃;

defaultConfig {
applicationId "com.example.textbookexhange"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

}

我的gradle包装很好distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip

您无法解析4.0版本的原因,因为4.0版本在JCenter中不可用。

https://jcenter.bintray.com/com/android/tools/build/gradle/

首先,4.0版本应该在你的Bintray包中提供,以便在JCenter中镜像。你可以在下面的Bintrax下载链接中查看相同的内容:https://dl.bintray.com/android/android-tools/com/android/tools/build/gradle/

更新路径"下的4.0版本;com/android/tools/build/gradle";以便它将反映在JCenter中。

相关内容

最新更新