【发布时间】:2022-01-12 21:18:05
【问题描述】:
出乎意料的是,在构建我的 Flutter 应用程序 Android 版本时,我开始收到以下构建错误。构建工作正常,然后突然间开始出现此错误。
我没有更改我的 pubspec.yaml 依赖项,也没有更改我的任何 gradle 配置文件。我一直在使用当前的 gradle 配置来构建很长时间而没有错误。我不确定如何在不更改构建系统的情况下弹出此错误。
我已经研究过这个错误,似乎很多修复它的建议是在 gradle-wrapper.properties 中修改 gradle 版本。我已经将版本从 5.6 升级到 6.7 再到 7.2,试图解决这个问题,但这些更改都没有奏效。我在这些变化之间跑得很干净。
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve io.flutter:x86_64_debug:1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.
Required by:
project :app
> Could not resolve io.flutter:x86_64_debug:1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.
> Could not get resource 'https://jcenter.bintray.com/io/flutter/x86_64_debug/1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6/x86_64_debug-1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.pom'.
> Could not GET 'https://jcenter.bintray.com/io/flutter/x86_64_debug/1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6/x86_64_debug-1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve io.flutter:x86_debug:1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.
Required by:
project :app
> Could not resolve io.flutter:x86_debug:1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.
> Could not get resource 'https://jcenter.bintray.com/io/flutter/x86_debug/1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6/x86_debug-1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.pom'.
> Could not GET 'https://jcenter.bintray.com/io/flutter/x86_debug/1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6/x86_debug-1.0.0-890a5fca2e34db413be624fc83aeea8e61d42ce6.pom'. 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 2m 22s
【问题讨论】:
标签: android flutter gradle bintray