【发布时间】:2019-04-06 02:24:02
【问题描述】:
问题:
当我尝试在 Android Studio 3.3 Beta 2 中构建我的 Kotlin 项目的 release variant 时,它会随机卡住 10吐出一些错误后到 16 分钟。
运行gradle/assemble 它显示以下错误:
> Task :app:lintVitalRelease FAILED
:app:lintVitalRelease (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 8 mins 23.222 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
> Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Connection reset
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:lintVitalRelease'.
到目前为止我已经尝试过什么
这个问题的答案Could not find org.codehaus.groovy:groovy-all:2.4.12 但它根本没有下载并且卡住了。
试图在浏览器中打开链接,它正在下载文件,但在构建过程中没有下载https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar
创建了一个全新的项目试图在那里发布同样的问题
项目 Gradle 设置
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0"
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
//workaround for Dagger2 > 2.16
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02'
我不知道是什么导致它停止下载或不允许它下载 groovy 文件,但我被困在这里,无法发布我的应用程序 :(
【问题讨论】:
-
稳定版 3.2 上会出现这种情况吗?
-
不,我也无法从那里发布任何东西,它在新项目中也卡在那里,已经超过 10 分钟了。
-
您使用的是代理,还是网速慢?不同版本的 Groovy 可以工作吗?
标签: android gradle groovy kotlin android-gradle-plugin