突然出现 200 行 firebase 错误

问题描述 投票:0回答:1

一切都很顺利。然后我走开,当我回来时,当我尝试运行我的应用程序时,我得到了这个。我设置了断点,但它似乎没有进入我的主要例程。

错误输出开始

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
../../AppData/Local/Pub/Cache/hosted/pub.dev/firebase_ui_auth-1.14.0/lib/src/screens/internal/multi_provider_screen.dart:25:14: Error: A value of type 'List<AuthProvider<AuthListener, AuthCredential>>?' can't be returned from a function with return type 'List<AuthProvider<AuthListener, AuthCredential>>' because 'List<AuthProvider<AuthListener, AuthCredential>>?' is nullable and 'List<AuthProvider<AuthListener, AuthCredential>>' isn't.
 - 'List' is from 'dart:core'.
 - 'AuthProvider' is from 'package:firebase_ui_auth/src/providers/auth_provider.dart' ('../../AppData/Local/Pub/Cache/hosted/pub.dev/firebase_ui_auth-1.14.0/lib/src/providers/auth_provider.dart').
 - 'AuthListener' is from 'package:firebase_ui_auth/src/providers/auth_provider.dart' ('../../AppData/Local/Pub/Cache/hosted/pub.dev/firebase_ui_auth-1.14.0/lib/src/providers/auth_provider.dart').
 - 'AuthCredential' is from 'package:firebase_auth_platform_interface/src/auth_credential.dart' ('../../AppData/Local/Pub/Cache/hosted/pub.dev/firebase_auth_platform_interface-7.1.8/lib/src/auth_credential.dart').
      return _providers;
             ^

错误输出结束

../../AppData/Local/Pub/Cache/hosted/pub.dev/vm_service-13.0.0/lib/src/vm_service.dart:314:30: Context: '_disposeHandler' couldn't be promoted because field promotion is only available in Dart 3.2 and above.
See http://dart.dev/go/non-promo-field-promotion-unavailable
  late final DisposeHandler? _disposeHandler;
                             ^
Target kernel_snapshot failed: Exception


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Flutter-Dart\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 14s
Error: Gradle task assembleDebug failed with exit code 1

这是我迄今为止尝试过但没有成功的方法:

  • 发布/更新
  • flutter 清理并重建
  • 退出项目,重新启动Windows
  • 删除了该项目并从 github 中提取了一个已知良好的副本(仍然出现相同的错误!)
android firebase dart
1个回答
0
投票

我需要继续解决这个问题,所以我重新格式化了驱动器,重新安装了 Windows 和 Android 项目,拉下了我的项目,一切又恢复正常了。

© www.soinside.com 2019 - 2024. All rights reserved.