我正在嘗試運行我的顫振專案,但我收到了這個錯誤日志:
/D:/applications/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/utils/exception.dart:12:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(Object exception, StackTrace stackTrace) {
^
3
FAILURE: Build failed with an exception.
* Where:
Script 'D:\applications\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\applications\Flutter\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.
* Get more help at https://help.gradle.org
BUILD FAILED in 34s
Exception: Gradle task assembleDebug failed with exit code 1
這是顫振醫生的輸出:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1526], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Android Studio
[√] VS Code
[√] Connected device (3 available)
注意:我將軟體包名稱從默認更改為我需要的名稱,如果這可能有助于找到錯誤!
uj5u.com熱心網友回復:
這可能是由于您使用舊版本的 Flutter 和相對較新版本的軟體包造成的。您可以嘗試更新您的 Dart/Flutter 版本,這可能會解決您的問題: https ://docs.flutter.dev/development/tools/sdk/upgrading
uj5u.com熱心網友回復:
嘗試
撲干凈
發布獲取然后重新啟動應用程式
uj5u.com熱心網友回復:
我重讀了你的錯誤,在我看來,你從 firestore 得到 null
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/445977.html
