android - 我在android studio中遇到了这个问题。我已经下载了链接中提到的文件,并将其粘贴到哪里

标签 android android-studio flutter gradle android-studio-3.6

以 Debug模式在LS 5016上启动lib \ main.dart ...
正在运行Gradle任务'assembleDebug'...

失败:生成失败,发生异常。

  • 出了什么问题:
    配置根项目“android”时发生问题。

    Could not resolve all artifacts for configuration ':classpath'. Could not download builder.jar (com.android.tools.build:builder:3.5.0) Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.5.0/builder-3.5.0.jar'. Premature end of Content-Length delimited message body (expected: 8174407; received: 2359280 Could not download bundletool.jar (com.android.tools.build:bundletool:0.9.0) Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.9.0/bundletool-0.9.0.jar'. Premature end of Content-Length delimited message body (expected: 5248142; received: 4456416

  • 尝试:
    使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。与--scan一起运行以获取完整的见解。
  • https://help.gradle.org上获得更多帮助

  • 在27m 34秒内失败
    错误完成:Gradle任务assembleDebug失败,退出代码为1

    最佳答案

    当我遇到Could not resolve all artifacts for configuration ':classpath'时,我通常使cache无效,重新启动,清理和重建项目。奇怪的是,问题就这样解决了。

    无论如何,如果要添加更多依赖关系,则可以选择"file">“项目结构”>“依赖关系”。

    希望对您有所帮助!

    关于android - 我在android studio中遇到了这个问题。我已经下载了链接中提到的文件,并将其粘贴到哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61384005/

    相关文章:

    android - 通过 HCE 付款

    android - 编译时"All com.android.support libraries must use the exact same version specification"android.support :appcompat-v7:25. 2.0

    android-studio - 找不到 Android Studio 1.2 : Error:Android Source Generator: [app] AndroidManifest. xml 文件

    android - 当我添加安全参数插件时,Gradle 同步失败

    flutter - 如何用 "_"替换字符串中的特殊字符

    网页 flutter : text cut off at bottom

    Flutter(IOS)内购本地收据

    android - 如何从包名中获取 PID?

    android - IIS Express MVC 远程调试 SSL 连接错误

    android - 如何修改自定义 Android ROM 中的应用程序设置?