I am new to flutter and i am trying to compile and run a code from a vendor, but I get the error below.
i know its a configuration error but i cant figure it out.
can anyone help out?
Launching libmain.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
/E:/flutter_windows_2.8.0-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-3.2.0/lib/src/method_channel/utils/exception.dart:13:11: Error: Member not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(exception, stackTrace);
^^^^^^^^^^^^^^^^^^^
/E:/flutter_windows_2.8.0-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-3.2.0/lib/src/method_channel/utils/exception.dart:16:9: Error: Member not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(
^^^^^^^^^^^^^^^^^^^
/E:/flutter_windows_2.8.0-stable/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-3.2.0/lib/src/method_channel/utils/exception.dart:11:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(Object exception, StackTrace stackTrace) {
^
FAILURE: Build failed with an exception.
* Where:
Script 'E:flutter_windows_2.8.0-stableflutterpackagesflutter_toolsgradleflutter.gradle' line: 1070
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'E:flutter_windows_2.8.0-stableflutterbinflutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10m 2s
Exception: Gradle task assembleDebug failed with exit code 1
2
Answers
upgraded to Flutter 2.10.0 stable, and it compiled. thanks
Alternatively, you can add this to your pubspec.yaml and you should be just fine