我能够在October 6th
上构建和发布我的flutter应用程序,今天我在Octuber 30th
上返回,我得到了这个构建错误:
Could not resolve io.grpc:grpc-core:[1.28.0].
Could not HEAD 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'.
Read timed out
cloud_firestore
似乎有问题,不知何故,它仍然试图从jcenter读取,我被告知它关闭了,不支持新的仓库,但问题是,我没有改变一行,也没有更新任何包,因为我上次发布和构建,是什么导致了这个问题?
我记得几个月前我也遇到过类似的问题,但在我用mavenCentral替换jcenter后,一切都得到了修复,但这次它又回来了。
Launching lib\main.dart on Android SDK built for x86 in debug mode...
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.grpc:grpc-core:[1.28.0].
Required by:
project :app > project :cloud_firestore > com.google.firebase:firebase-firestore:21.7.1 > io.grpc:grpc-android:1.28.0
project :app > project :cloud_firestore > com.google.firebase:firebase-firestore:21.7.1 > io.grpc:grpc-okhttp:1.28.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 HEAD 'https://jcenter.bintray.com/io/grpc/grpc-core/maven-metadata.xml'.
> Read timed out
* 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 1m 37s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
这是我的build.gradle
:
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.2'
classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
是的,我的应用程序很旧,因为我还没有更新到零安全。
有什么提示可以避免将来出现此问题吗?
如何解决当前的问题?
2条答案
按热度按时间gjmwrych1#
我也一样
JCenter似乎有问题。它应该是可用的,尽管它被更改为只读。
另请参阅https://updownradar.com/status/jcenter.bintray.com
我也不指望星期天能解决问题;所以,等到明天吧。
关于JFROG:
2021年4月27日更新:我们听取了社区的意见,并将无限期地将JCenter作为只读存储库。我们的客户和社区可以继续依赖JCenter作为Java包的可靠镜像。(来源https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/)
7ajki6be2#
看起来Jcenter刚刚关闭,根据https://developer.android.com/studio/build/jcenter-migration,网站将继续无限期地提供只读存储库。