/C:/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:4:1: Error: A library can't opt out of null safety by default, when using sound null safety. // @dart = 2.8 ^^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/wakelock_platform_interface-0.1.0+1/lib/messages.dart:4:1: Error: A library can't opt out of null safety by default, when using sound null safety. // @dart = 2.8 ^^^^^^^^^^^^^^ Error: Cannot run with sound null safety, because the following dependencies don't support null safety:
Hi,
I imported project from other person. When I try pub get it say requires SDK version >=2.12.0 <3.0.0, version solving failed. Then i Updated dart it through this error.
Solution 1:
enter link description here
I have tried above link solution still throughs this above error
Try this, Go to terminal and run this command; flutter run --no-sound-null-safety
Only one line Magic code can Build your APK.
-> open Main file.
-> write this line on the 1st top line.
**" // @dart=2.9 "**
-> run apk. or build apk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With