after I upgrade Flutter version the project accidently throw many errors. and this are errors which I don't understand how to solve.
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
Where: Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1151
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
[enter image description here](https://i.sstatic.net/1jpnr.png)
pubspec.yaml enter image description here
android/build.gradle enter image description here
app/build.gradle enter image description here
Solved ! As can be seen in screenshots that there are some errors of packages (flutter_local_notifications - modal_bottom_sheet )
1 - I deleted cache folder in C/$user_name/AppData/Local/Pub
2 - Updated all packages manually including flutter_local_notifications
3 - Added under dependency_overrides this package
modal_bottom_sheet: git: url: https://github.com/danReynolds/modal_bottom_sheet.git path: modal_bottom_sheet
4 - run flutter clean
5 - run your project successfully
As can be seen in your linked screenshot, there's an issue with how flutter_local_notifications uses a wrong signature for a class from flutter_local_notifications_platform_interface. This is probably a result of invalid version constraints made by the developer in the 10.0.0-dev.1 prerelease version that you're using.
I would recommend updating the flutter_local_notifications to the latest version (as of the time I'm responding is 13.0.0).
If you can't do that, you can at least update to a stable version. The one you're using is a prerelease version according to semantic versioning. Try version 10.0.0.
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