颤振-无法获取';https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. 接收状态代码403
我有一个项目昨天运行良好,但今天,我得到了这个错误颤振-无法获取';https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. 接收状态代码403,android,flutter,gradle,Android,Flutter,Gradle,我有一个项目昨天运行良好,但今天,我得到了这个错误 FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > Could not resolve all task dependencies for configuration ':app:debugCompileCla
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve com.google.android.gms:play-services-location:16.+.
Required by:
project :app > project :location
> Failed to list versions for com.google.android.gms:play-services-location.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-location/maven-metadata.xml'. Received status code 403 from server: Forbidden
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
Exception: Gradle task assembleDebug failed with exit code 1
我今天没有改变任何等级或舱单,只是昨天的相同代码
我所做的是
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Gradle包装器属性
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
我正在使用这个最新版本的包Geolocator
https://pub.dev/packages/geolocator
更新
Change the distribution URL into
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-all.zip
Fix my problem
尝试在gradle-wrapper.properties中使用以下distributionUrl:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
以及build.gradle文件中依赖项中的以下类路径:
classpath'com.android.tools.build:gradle:4.1.0
查看颤振2.0.5稳定通道,这些是正确的设置。这为我解决了问题。尝试在gradle-wrapper.properties中使用以下distributionUrl:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
以及build.gradle文件中依赖项中的以下类路径:
classpath'com.android.tools.build:gradle:4.1.0
查看颤振2.0.5稳定通道,这些是正确的设置。这为我解决了问题。为我通过升级解决了问题 将DKVersion从29编译到30 targetSdkVersion从29到30 gradle-wrapper.properties 我的分发URL是
分配=https://services.gradle.org/distributions/gradle-6.5-bin.zip对我来说,通过升级解决我的问题 将DKVersion从29编译到30 targetSdkVersion从29到30 gradle-wrapper.properties 我的分发URL是
分配=https://services.gradle.org/distributions/gradle-6.5-bin.zip我之前就这样做了,但得到了另一个错误(来自这个git链接),目前我正在将distributionurl更改为
https\://services.gradle.org/distributions/gradle-6.0-all.zip
,它又开始工作了,我使用的是颤振2.0.6稳定Channel@DonKey如果您的答案解决了您的问题,请将其作为答案发布,并将其标记为解决方案目前,我正在将distributionurl更改为https\://services.gradle.org/distributions/gradle-6.0-all.zip
,它又开始工作了,我正在使用Flatter 2.0.6Channel@DonKey如果您的答案解决了您的问题,请将其作为答案发布,并将其标记为解决方案。
https://pub.dev/packages/geolocator
Change the distribution URL into
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-all.zip
Fix my problem