小编sst*_*off的帖子

使用直接 dart firebase 初始化的 Flutter 在真实设备上仍然会出现错误:无法找到配置文件:'GoogleService-Info.plist'

Flutter 2.8.1 使用 flutterfire - 根据文档,不需要使用 GoogleService-Info.plist 文件。该版本声明它支持直接 dart 初始化。在模拟器上工作正常,但是当在真实的 iOS 设备上运行时 - 从 Android Studio 或 XCode,我收到有关 plist 文件的错误。flutterfire configure 创建一个有效的 firebase_options.dart 文件,main 如下所示:

\n
void main() async {\n  WidgetsFlutterBinding.ensureInitialized();\n  await Firebase.initializeApp(\n    options: DefaultFirebaseOptions.currentPlatform,\n  );\n\n  runApp(const MyApp());\n}\n
Run Code Online (Sandbox Code Playgroud)\n

flutter doctor 的输出:

\n
Doctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-x64, locale en-US)\n[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)\n    \xe2\x9c\x97 cmdline-tools component is missing\n …
Run Code Online (Sandbox Code Playgroud)

ios firebase flutter

6
推荐指数
1
解决办法
2263
查看次数

标签 统计

firebase ×1

flutter ×1

ios ×1