gpt4 book ai didi

dart - flutter 错误 : Attempt to invoke virtual method 'void com.google.firebase.auth.internal.zzab.zzf(int)' on a null object reference, null

转载 作者:IT王子 更新时间:2023-10-29 06:54:34 25 4
gpt4 key购买 nike

每当我构建我的应用程序时,我的应用程序都会成功构建,但在将其安装到设备时,我会遇到以下错误并且应用程序在设备上崩溃并显示白屏。

    Launching lib/main.dart on Pixel 2 XL in debug mode...
Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Note: /Users/sureshkumarmajhi/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+1/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/sureshkumarmajhi/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.15/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/sureshkumarmajhi/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.15/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: /Users/sureshkumarmajhi/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5+1/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/sureshkumarmajhi/.pub-cache/hosted/pub.dartlang.org/firebase_storage-1.0.1/android/src/main/java/io/flutter/plugins/firebase/storage/FirebaseStoragePlugin.java:293: warning: [unchecked] unchecked cast
Map<String, String> customMetadata = (Map<String, String>) map.get("customMetadata");
^
required: Map<String,String>
found: Object
1 warning
Note: /Users/sureshkumarmajhi/.pub-cache/hosted/pub.dartlang.org/video_player-0.6.4/android/src/main/java/io/flutter/plugins/videoplayer/VideoPlayerPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): Failed to handle method call
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.firebase.auth.internal.zzab.zzf(int)' on a null object reference
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.google.firebase.auth.FirebaseAuth.addIdTokenListener(Unknown Source:16)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.google.firebase.firestore.obfuscated.zzc.<init>(com.google.firebase:firebase-firestore@@17.1.1:76)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.google.firebase.firestore.FirebaseFirestore.zza(com.google.firebase:firebase-firestore@@17.1.1:109)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.google.firebase.firestore.zzh.zza(com.google.firebase:firebase-firestore@@17.1.1:51)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.google.firebase.firestore.FirebaseFirestore.zza(com.google.firebase:firebase-firestore@@17.1.1:87)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.google.firebase.firestore.FirebaseFirestore.getInstance(com.google.firebase:firebase-firestore@@17.1.1:78)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin.getFirestore(CloudFirestorePlugin.java:82)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin.onMethodCall(CloudFirestorePlugin.java:603)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#plugins.flutter.io/cloud_firestore( 2716): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/flutter ( 2716): [ERROR:flutter/shell/common/shell.cc(181)] Dart Error: Unhandled exception:
E/flutter ( 2716): PlatformException(error, Attempt to invoke virtual method 'void com.google.firebase.auth.internal.zzab.zzf(int)' on a null object reference, null)
E/flutter ( 2716): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:551:7)
E/flutter ( 2716): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
E/flutter ( 2716): <asynchronous suspension>
E/flutter ( 2716): #2 Firestore.settings (file:///Users/sureshkumarmajhi/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+1/lib/src/firestore.dart:136:19)
E/flutter ( 2716): <asynchronous suspension>
E/flutter ( 2716): #3 main (file:///Users/sureshkumarmajhi/AndroidStudioProjects/bhramaan/lib/main.dart:62:19)
E/flutter ( 2716): <asynchronous suspension>
E/flutter ( 2716): #4 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:289:19)
E/flutter ( 2716): #5 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
Syncing files to device Pixel 2 XL...

升级到最新的 cloud_firestore: ^0.8.2+1 后出现此错误。无法理解发生了什么。 :(

最佳答案

firebase_auth: "^0.5.15"(上一个)更新到最新的 firebase_auth: "^0.6.2+1" 后解决了我的问题。希望它能帮助别人。 :)

关于dart - flutter 错误 : Attempt to invoke virtual method 'void com.google.firebase.auth.internal.zzab.zzf(int)' on a null object reference, null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52976055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com