Wik*_*tor 10 android ios firebase flutter
我的项目突然停止正常运行 - 它无法初始化 FirebaseApp。
\n我一直在使用老式的 Firebase 配置 - 直接从 Firebase 控制台使用 Google-Services 文件。我切换到命令flutterfire configure但错误没有消失。我也尝试删除整个ios目录并尝试再次运行flutterfire configure,但仍然没有结果。
错误:
\n[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)\n#0 FirebaseCoreHostApi.initializeCore (package:firebase_core_platform_interface/src/pigeon/messages.pigeon.dart:205:7)\n<asynchronous suspension>\n#1 MethodChannelFirebase._initializeCore (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:29:44)\n<asynchronous suspension>\n#2 MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:73:7)\n<asynchronous suspension>\n#3 Firebase.initializeApp (package:firebase_core/src/firebase.dart:40:31)\n<asynchronous suspension>\n#4 main (package:traveler/main.dart:12:3)\n<asynchronous suspension>\nRun Code Online (Sandbox Code Playgroud)\n导致问题的线路:
\n // Placed after WidgetsFlutterBinding.ensureInitialized();\n await Firebase.initializeApp(\n options: DefaultFirebaseOptions.currentPlatform,\n );\nRun Code Online (Sandbox Code Playgroud)\n颤振医生-v:
\n[\xe2\x9c\x93] Flutter (Channel master, 3.1.0-0.0.pre.1310, on macOS 12.4 21F79 darwin-arm, locale en-PL)\n \xe2\x80\xa2 Flutter version 3.1.0-0.0.pre.1310 at /Users/wiktor/development/flutter\n \xe2\x80\xa2 Upstream repository https://github.com/flutter/flutter.git\n \xe2\x80\xa2 Framework revision 91603595d1 (13 days ago), 2022-06-18 19:14:07 -0400\n \xe2\x80\xa2 Engine revision 3ac96a1f40\n \xe2\x80\xa2 Dart version 2.18.0 (build 2.18.0-190.0.dev)\n \xe2\x80\xa2 DevTools version 2.14.0\n\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 31.0.0)\n \xe2\x80\xa2 Android SDK at /Users/wiktor/Library/Android/sdk\n \xe2\x80\xa2 Platform android-31, build-tools 31.0.0\n \xe2\x80\xa2 Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)\n \xe2\x80\xa2 All Android licenses accepted.\n\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 13.4)\n \xe2\x80\xa2 Xcode at /Applications/Xcode.app/Contents/Developer\n \xe2\x80\xa2 Build 13F17a\n \xe2\x80\xa2 CocoaPods version 1.11.3\n\n[\xe2\x9c\x93] Chrome - develop for the web\n \xe2\x80\xa2 Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome\n\n[\xe2\x9c\x93] Android Studio (version 4.2)\n \xe2\x80\xa2 Android Studio at /Applications/Android Studio.app/Contents\n \xe2\x80\xa2 Flutter plugin can be installed from:\n https://plugins.jetbrains.com/plugin/9212-flutter\n \xe2\x80\xa2 Dart plugin can be installed from:\n https://plugins.jetbrains.com/plugin/6351-dart\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)\n\n[\xe2\x9c\x93] Android Studio\n \xe2\x80\xa2 Android Studio at /Users/wiktor/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.7905991/Android Studio Preview.app/Contents\n \xe2\x80\xa2 Flutter plugin can be installed from:\n https://plugins.jetbrains.com/plugin/9212-flutter\n \xe2\x80\xa2 Dart plugin can be installed from:\n https://plugins.jetbrains.com/plugin/6351-dart\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)\n\n[\xe2\x9c\x93] Android Studio\n \xe2\x80\xa2 Android Studio at /Users/wiktor/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.7863044/Android Studio Preview.app/Contents\n \xe2\x80\xa2 Flutter plugin can be installed from:\n https://plugins.jetbrains.com/plugin/9212-flutter\n \xe2\x80\xa2 Dart plugin can be installed from:\n https://plugins.jetbrains.com/plugin/6351-dart\n \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)\n\n[\xe2\x9c\x93] IntelliJ IDEA Ultimate Edition (version 2021.1.2)\n \xe2\x80\xa2 IntelliJ at /Users/wiktor/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app\n \xe2\x80\xa2 Flutter plugin can be installed from:\n https://plugins.jetbrains.com/plugin/9212-flutter\n \xe2\x80\xa2 Dart plugin can be installed from:\n https://plugins.jetbrains.com/plugin/6351-dart\n\n[\xe2\x9c\x93] IntelliJ IDEA Ultimate Edition (version 2021.1.2)\n \xe2\x80\xa2 IntelliJ at /Users/wiktor/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/211.7442.40/IntelliJ IDEA.app\n \xe2\x80\xa2 Flutter plugin version 68.1.1\n \xe2\x80\xa2 Dart plugin version 211.7817\n\n[\xe2\x9c\x93] Connected device (3 available)\n \xe2\x80\xa2 iPod touch (7th generation) (mobile) \xe2\x80\xa2 BAEBD16B-8BA9-4D2F-B86D-38282E5FA060 \xe2\x80\xa2 ios \xe2\x80\xa2 com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)\n \xe2\x80\xa2 macOS (desktop) \xe2\x80\xa2 macos \xe2\x80\xa2 darwin-arm64 \xe2\x80\xa2 macOS 12.4 21F79 darwin-arm\n \xe2\x80\xa2 Chrome (web) \xe2\x80\xa2 chrome \xe2\x80\xa2 web-javascript \xe2\x80\xa2 Google Chrome 103.0.5060.53\n\n[\xe2\x9c\x93] HTTP Host Availability\n \xe2\x80\xa2 All required HTTP hosts are available\n\n\xe2\x80\xa2 No issues found!\n\nRun Code Online (Sandbox Code Playgroud)\n
这个问题发生在最新的 firebase_core_platform_interface 中,因此覆盖旧版本可以暂时解决该问题。(Firebase 团队修复后即可将其删除)
dependency_overrides:
firebase_core_platform_interface: 4.4.1
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10022 次 |
| 最近记录: |