Download StackFood Multi Restaurant, Food Delivery App with Laravel Admin and Restaurant Panel Buy Full App on $79
Download FlutKit - Flutter UI Kit Most beautiful Flutter UI Kit with 20+ Full App, 450+ Screens. Buy Full Kit on $39
Download Fluxstore Multi Vendor WooCommerce/Dokan Plugin compatible WordPress eCommerce Flutter App. Buy Full App on $79

How to Solve ’Cannot run with sound null safety’ Error on Flutter App

Are you getting 'Error: Cannot run with sound null safety, because the following dependencies don't support null safety' error while running your app, then have look to solve it.

Error Message:

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

 - package:packagename


* Get more help at https://help.gradle.org

BUILD FAILED in 51s

Solution One:

Run your app with additional '--no-sound-null-safety' args.

flutter run --no-sound-null-safety

Platform target Run command:

flutter run -d chrome --no-sound-null-safety

Solution Two for Visual Studio Code Users:

Go to Settings and find "run additional args".

Copy: --no-sound-null-safety and add into it:

Run your program from "Run Menu".

Solution Three for Android Studio IDE users:

Click on "main.dart" at top of IDE, and click on "Edit Configuration". Note: You need to add Flutter and Dart plugin on android studio, otherwise this menu is not available. 

Copy: --no-sound-null-safety and add into "additional run args".

Run your app with "Run/Play" Button or from "Run" Menu.

In this way, you can solve "Error: Cannot run with sound null safety, because the following dependencies don't support null safety" error on Flutter project.

No any Comments on this Article


Please Wait...