添加 cloud_firestore 依赖项时 Flutter 显示错误

时间:2021-05-30 08:02:47

标签: android firebase flutter google-cloud-firestore

我添加了 firebase 插件并且没有错误显示。 但是在添加 cloud_firestore 依赖项后,它显示错误。 我已经在项目中添加了 firebase_core 依赖

这是我的 pubspec.ymal

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^1.0.2
  shared_preferences: ^2.0.6
  provider: ^5.0.0
  firebase_core: ^1.2.0
  firebase_auth: ^1.2.0
  cloud_firestore: ^2.2.0

这是错误,

Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.2.0\android\src\main\java\io\flutter\plugins\f
irebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.2.0\android\src\main\java\io\flutter\plugins
\firebase\firestore\FlutterFirebaseFirestorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-2.2.0\android\src\main\java\io\flutter\plugins
\firebase\firestore\streamhandler\TransactionStreamHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-1.2.0\android\src\main\java\io\flutter\plugins\f
irebase\auth\FlutterFirebaseAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
D8: Cannot fit requested classes in a single dex file (# methods: 91977 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html

`

0 个答案:

没有答案