Flutter无法使用Firestore构建iOS应用

时间:2019-03-10 14:30:01

标签: firebase flutter google-cloud-firestore

尝试将Firebase Cloud Firestore功能添加到我的测试Flutter应用程序中,但是在尝试构建应用程序/在调试中运行时遇到问题。

我已经按照Flutter的官方视频介绍了如何为iOS添加Firebase(注册应用程序,下载.plist-将其添加到Xcode中)。当然,我还向pubspec添加了Firestore依赖性。

当我尝试运行我的应用程序时,我在调试控制台中得到的只是:

Launching lib/main.dart on iPhone XS in debug mode...

它会一直保持这种模式。

我试图从依赖关系中删除Firestore,然后我的应用程序运行没有任何问题。

Flutter Doctor -v:

[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale en-SI)
    • Flutter version 1.2.1 at /Users/zanfras/Developer/tools/flutter
    • Framework revision 8661d8aecd (3 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/zanfras/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Community Edition (version 2018.3.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 33.3.2
    • Dart plugin version 183.5912.23

[✓] VS Code (version 1.32.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.24.0

[✓] Connected device (1 available)
    • Žan’s iPhone • 00008020-001D48660C28002E • ios • iOS 12.1.4

• No issues found!

GitHub链接到示例项目:https://github.com/frasza/flutter-firebase-test

Flutter运行-v日志: https://pastebin.com/Q3jTU3jN

任何想法可能是导致问题的原因吗?

1 个答案:

答案 0 :(得分:0)

运行flutter run -v并使其运行几分钟后,构建成功。甚至花了将近10分钟。