嗨,我试图建立一个应用程序的Flutter,但我得到这个错误日志
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
> 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 502 from server: Bad Gateway
* 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 7m 49s
字符串
我试图按照这个链接Could not GET 'play-services-location/maven-metadata.xml'. Received status code 502 from server: Bad Gateway的步骤,但我仍然得到错误,有没有办法解决这种情况。我从昨天开始就一直在尝试解决这个问题,但还是得到了错误。这是我的android/build.gradle
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
// jcenter()
mavenCentral()
}
dependencies {
// classpath 'com.android.tools.build:gradle:3.5.0'
// classpath 'com.android.tools.build:gradle:3.4.2'
classpath "com.android.tools.build:gradle:4.2.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
repositories {
google()
// jcenter()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
//
型
我还在Gradle-wrapper.properties中实现了distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
1条答案
按热度按时间wj8zmpe11#
错误日志似乎指出
location
插件导致了这个问题。尝试更新您正在使用的插件,并运行flutter clean
和flutter pub get
来刷新配置的包。