【问题标题】:Error when installing cloud_firestore flutter for Android为 Android 安装 cloud_firestore flutter 时出错
【发布时间】:2021-12-01 00:04:47
【问题描述】:

我尝试将 cloud_firestore 安装到我的颤振应用程序已经有几个小时了。我已经安装了很多插件,所以我不知道出了什么问题。 这就是我所做的:

我打开了 pubspec.yaml,我添加了 cloud_firestore:

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.2
  cloud_firestore: ^3.1.0

然后在终端中,我写:

flutter pub get 

当我在我的 Android(模拟器和真实设备)上编译代码时,我收到此错误:

这是文件https://easyupload.io/1zsfc0

我试图理解错误,但我不理解

有什么提示吗?可能是什么问题?

【问题讨论】:

  • 在构建 apk 时尝试添加命令 --no-shrink

标签: firebase flutter dart google-cloud-firestore plugins


【解决方案1】:

在您的 android/app/build.gradle 中。 您需要添加 multiDexEnabled。

defaultConfig {
        ...
        multiDexEnabled = true
    }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-03-09
    • 1970-01-01
    • 1970-01-01
    • 2021-06-17
    • 1970-01-01
    • 2020-09-30
    • 2017-08-04
    • 1970-01-01
    相关资源
    最近更新 更多