小编Amo*_*ber的帖子

Flutter中的cloud_firestore和firebase_auth兼容性问题

我正在开发Flutter应用。当我cloud_firestorefirebase_auth分别使用它们时,我的应用程序可以与和软件包一起正常工作。但是,当我将它们都包含在pubspecs.yaml文件中时,构建将失败,并显示以下消息:

注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.4/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/ CloudFirestorePlugin.java使用未经检查或不安全的操作。注意:使用-Xlint:unchecked重新编译以获取详细信息。注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.18/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin。 java使用或覆盖已弃用的API。注意:有关详细信息,请使用-Xlint:deprecation重新编译。注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.18/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin。 Java使用未经检查或不安全的操作。注意:使用-Xlint:unchecked重新编译以获取详细信息。注意:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5/android/src/main/java/io/flutter/plugins/firebase/core/FirebaseCorePlugin。 Java使用未经检查或不安全的操作。注意:使用-Xlint:unchecked重新编译以获取详细信息。

失败:构建失败,发生异常。

  • 出了什么问题:任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug'的执行失败。

    java.lang.RuntimeException:java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex

这是我的pubspec.yaml文件中的依赖关系:

dependencies:
   flutter:
     sdk: flutter
   firebase_auth: ^0.5.18
   cloud_firestore: ^0.7.4
Run Code Online (Sandbox Code Playgroud)

我检查了软件包的版本,它们似乎都是最新版本。

解决此问题的任何帮助将不胜感激!

这可能与这个问题有关,但我不确定。

android firebase firebase-authentication flutter google-cloud-firestore

6
推荐指数
3
解决办法
2705
查看次数