以 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一起运行以获取完整的见解。
在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/