无法解析配置':app:debugCompileClasspath'的所有工件



在flutter 1.17更新后,我试图运行我的应用程序,但它显示了这个错误。flutter doctor命令工作正常。我不明白发生了什么

Launching libmain.dart on Redmi Note 7 Pro in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Could not download arm64_v8a_debug.jar (io.flutter:arm64_v8a_debug:1.0.0-540786dd51f112885a89792d678296b95e6622e5)
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-540786dd51f112885a89792d678296b95e6622e5/arm64_v8a_debug-1.0.0-540786dd51f112885a89792d678296b95e6622e5.jar'.
> Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-540786dd51f112885a89792d678296b95e6622e5/arm64_v8a_debug-1.0.0-540786dd51f112885a89792d678296b95e6622e5.jar'.
> Remote host closed connection during handshake
* 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 12s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

我遇到了类似的kotlin-sdk资源不可用的问题。找不到快速解决方案,但问题很可能发生在服务器端有资源的情况下。因为第二天早上,整个集会成功了。如果在此之前一切都很顺利,并且突然停止,那么您也许应该等待

在阅读了整个分支之后,我仍然没有找到适合我的案例的解决方案,但它可能对某些人有用。https://github.com/flutter/flutter/issues/23553

我遇到了类似的问题,当我在build.gradle文件中更改以下设置时,问题得到了解决:

ext.kotlin_version = '1.3.61' //from 1.3.50
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3' //from 3.5.0
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

相关内容

  • 没有找到相关文章

最新更新