报错代码如下
FAILURE: Build failed with an exception.* What went wrong:Could not determine the dependencies of task ':app:preDebugBuild'.> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not resolve com.mob:MobToolsMCFP:+. Required by: project :app project :app > project :sharesdk > Failed to list versions for com.mob:MobToolsMCFP. > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/mob/MobToolsMCFP/maven-metadata.xml. > Could not get resource 'https://google.bintray.com/exoplayer/com/mob/MobToolsMCFP/maven-metadata.xml'. > Could not GET 'https://google.bintray.com/exoplayer/com/mob/MobToolsMCFP/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
解决方案:
打开External Libraries--Flutter Plugins--image_picker--android--build.gradle,找到如下代码,注释掉Maven的三行代码,这个错误就解决掉了。期间android studio可能会提示,直接选择我要编辑就可以
rootProject.allprojects {
repositories {
google()
jcenter()
/* maven {
url 'https://google.bintray.com/exoplayer/'
} */
}
}