前言
学习Flutter的网络请求引入Http组件时报错
Xcode's output:
↳
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:http
- package:http_parser
For solutions, see https://dart.dev/go/unsound-null-safety
Failed to package /Users/mxmac/Documents/Flutter项目/today_news.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
一、解决方法:
在Android Studio中
添加:–no-sound-null-safety
END.