-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
legacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.
Description
Porting flutter/flutter#70145 by @tvolkert:
Steps to reproduce:
- Upgrade your app to null safety
- Introduce a package dependency for which the package has no null safe version
- Run
flutter run
Expected results
You expect the error message to tell you both why it's unable to run in sound mode (because the dependencies aren't null safe) and how to get around the error (by running with --no-sound-null-safety).
Actual results
It tells you why it failed to build and how to inspect the package versions, but it doesn't tell you how to sidestep the problem for now...
> flutter run -t lib/main.dart -d iphone --debug
Running "flutter pub get" in payouts... 458ms
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install... 1,746ms
Running Xcode build...
Xcode build done. 15.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Error: This project cannot run with sound null safety, because one or more project dependencies do not
support null safety:
- package:http
- package:intl
- package:http_parser
Run 'pub outdated --mode=null-safety' to determine if versions of your
dependencies supporting null safety are available.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Sure enough, in this example, running flutter run --no-sound-null-safety ... allowed the app to run.
Metadata
Metadata
Assignees
Labels
legacy-area-front-endLegacy: Use area-dart-model instead.Legacy: Use area-dart-model instead.