Flutter编译时下载依赖报错的解决方案

Posted zhouziyan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flutter编译时下载依赖报错的解决方案相关的知识,希望对你有一定的参考价值。

报错代码:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac‘.
> Could not resolve all task dependencies for configuration ‘:app:debugCompileClasspath‘.
   > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-c9506cb8e93e5e8879152ff5c948b175abb5b997.
。。。。。。。

 

解决办法:

修改:flutter/packages/flutter_tools/gradle/resolve_dependencies.gradle

flutter/packages/flutter_tools/gradle/aar_init_script.gradle

flutter/packages/flutter_tools/gradle/flutter.gradle

 

中的:https://storage.googleapis.com/download.flutter.io   替换为:http://download.flutter.io   重新编译就好了

以上是关于Flutter编译时下载依赖报错的解决方案的主要内容,如果未能解决你的问题,请参考以下文章