4

/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

siva
  • 149
  • 1
  • 1
  • 11

2 Answers2

7

Try this, Go to terminal and run this command; flutter run --no-sound-null-safety

Mr. Ripper
  • 271
  • 2
  • 8
2

==> 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

☻♥ Done. keep code.

enter image description here