flutter Failed to download https://flutter-io.cn/flutter_infra_release/

执行 flutter test integration_test/app_test.dart 遇到 问题

Failed to download
https://flutter-io.cn/flutter_infra_release/flutter/6ba2af10bb05c88a2731482cedf2
cfd11cf5af0b/flutter-web-sdk-darwin-x64.zip. Ensure you have network
connectivity and then try again.
Exception: 404

flutter Failed to download https://flutter-io.cn/flutter_infra_release/_第1张图片

解决方法

1 先执行以下命令

export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

2 然后执行下面命令

flutter test integration_test/app_test.dart

一个Linux 命令技术点

Linux export 命令用于设置或显示环境变量。

语法为

export [-fnp][变量名称]=[变量设置值]
-f  代表[变量名称]中为函数名称。
-n  删除指定的变量。变量实际上并未删除,只是不会输出到后续指令的执行环境中。
-p  列出所有的shell赋予程序的环境变量。

详细可以参考 export 命令

你可能感兴趣的:(脚本,flutter)