【发布时间】:2022-10-16 12:09:44
【问题描述】:
我无法运行我的构建
我有这个代码
你能帮我吗?
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:19:11: Error: Member not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(exception, stackTrace);
^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:22:9: Error: Member not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(
^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:14:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(
^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.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.
【问题讨论】:
-
你系统上的颤振版本是什么?
-
可能是Why is riverpod failing even to initialize in project? Method not found: 'Error.throwWithStackTrace' 的副本。来自answerBaker:在 Dart 2.16 中添加了 Error.throwWithStackTrace(从 2022 年 2 月 8 日开始的 Flutter 版本 2.10)...如果您的 Flutter/Dart 版本低于该版本,您将收到您看到的错误。
-
这回答了你的问题了吗? Flutter - Problem with adding Firebase Messaging
-
这个问题有什么进展吗?
标签: flutter android-studio dart