微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

flutter遇到的问题归纳

版本升级篇:

问题一:

Failed to retrieve the Dart SDK from: https://storage.Flutter-io.cnexport/Flutter_infra/Flutter/2f0af3715217a0c2ada72c717d4ed9178d68f6ed/dart-sdk-darwin-x64.zip
If you're located in China, please see this page:
  https://Flutter.dev/community/china


解决办法:

先执行命令

export PUB_HOSTED_URL=https://pub.Flutter-io.cn

export FlutteR_STORAGE_BASE_URL=https://storage.Flutter-io.cn

完成后,再执行命令

Flutter doctor

问题二:

运行时出现:

Exception: Gradle task assembleDebug Failed with exit code 1

解决办法:

在android工程的build.gradle,如下图

加入 

maven { url 'http://download.Flutter.io' }

如下图

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐