无法确定任务':app:compileDebugJavaWithJavac Flutter VS 的依赖关系

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac Flutter VS

项目文件夹完美。错误在 visual studio、flutter 文件或其他地方。

我知道有旧版本的 VisualStudio 和 Flutter,但我的项目在这些版本中运行良好。 visual studio错误更新出现错误,我将其降级到我以前使用的版本但错误仍然存​​在

错误说明:

失败:构建失败,出现异常。

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not resolve io.grpc:grpc-core:[1.21.0]. Required by: project :app > io.grpc:grpc-okhttp:1.21.0 > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) > Failed to list versions for io.grpc:grpc-core. > Unable to load Maven meta-data from https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml. > Could not get resource 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > Could not GET 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message)

13 秒内构建失败 运行宁Gradle任务'assembleDebug'...
运行ning Gradle 任务 'assembleDebug'... 完成 14,1s 异常:Gradle 任务 assembleDebug 失败,退出代码为 1

颤振医生: 医生总结(查看所有细节,运行 flutter doctor -v): [√] Flutter(频道稳定,1.22.6,在 Microsoft Windows [版本 10.0.19043.1645],区域设置 es-AR)

[√] Android 工具链 - 为 Android 设备开发(Android SDK 版本 30.0.2) [√] Android工作室(4.0版) [√] VS代码(1.62.3版本) [√] 已连接设备(可用 1 个)

• 未发现问题!

修改build.gradle文件如下

之前

 repositories {
        google()
        jcenter()
 }

之后

 repositories {
        google()
        mavenCentral()
 }

祝你好运。