出乎意料的是,在构建我的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
尽管jcenter已被弃用和日落,但它仍将无限期地保持阅读状态。可能是你对bintray的依赖,也可能是gradle本身已经失去了支持。你可能需要找到一个替代方案。
https://blog.gradle.org/jcenter-shutdown
更新:JFrog决定无限期地将JCenter作为只读存储库。JCenter不再接受新的包和版本。所有纸盒服务都已关闭。
几个小时前我也遇到了这个问题。我正在使用最新的Flutter SDK 2.8.1。我寻找解决方案并尝试了很多事情。更新了所有插件,Gradle版本,但没有任何效果。
然后我将Flutter降级为2.5.3,现在运行良好。
我认为这是Flutter最新版本中的一个问题,或者jcore
站点中存在一些问题。
然而,目前降级可能是一种变通方法,我希望flutter团队能尽快解决这个问题。
您可以在项目级构建中用mavenCentral()替换jcenter()。gradle:
之前:
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
jcenter()
}
allprojects {
repositories {
google()
jcenter()
}
}
之后:
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
allprojects {
repositories {
google()
mavenCentral()
}
}
这很令人费解。我有一个使用Gradle构建的多模块多语言JVM项目。我有几个java模块和几个scala模块。scala模块使用ScalaTest作为测试框架。我将Gradle设置为使用scalatest插件运行测试。整个过程在IntelliJ中运行了大约一个月(使用Gradle创意插件)。现在,ScalaTest规范突然不再从IDE运行,出现以下错误: 有人知道发生了什么吗?我不确定自从我第一次
我尝试使用此插件裁剪图像,并在iOS上效果很好,但在Android上,应用程序会崩溃。控制台像这样说。 有人知道怎么修理这个吗?
应用程序崩溃,我会得到以下错误: 致命异常:主进程:com.example.ayyan.JellyBeanEstimator,pid:2960 java.lang.RuntimeException:无法启动活动 ComponentInfo{com.example.ayyan.JellyBeanEstimator/com.example.ayyan.JellyBeanEstimator.MainAc
我的flutter项目的android工作室中缺少gradle窗口,但它可以用于我的静态编程语言项目。 我必须生成才能在Firebase中注册我的应用。
Python 3.5。2. Ubuntu 16.04 LTS 尝试使用pip3安装某些软件包时,无论参数如何,它都会返回以下结果: 我试图通过以下方式重新安装python3 pip来修复它: 但那没有帮助。 我发现它与我安装的软件包有关,这些软件包是用
我安装了Android Studio 2.2。2使用Debian Jessie上的必要软件包并检查更新 当gradle构建开始时,我有2个错误: 错误:java.lang.运行时间异常:CrunchingCruncherlauncher.png失败,请参阅日志错误:任务执行失败:应用程序:mergeDebugResources。 我在这个论坛上寻找答案,我试图通过编辑/res/drawable文件