好吧,我运行我的程序时没有导入 firebase core、firebase auth 和 cloud firestore,我的代码运行得很好,但是我使用 firebase 注册了我的应用程序,它仍然运行得很好,但是一旦我导入Firebase_auth
, Firebase_core
and cloud_Firestore
...我收到以下错误
Note: C:\appflutter\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.7.0\android\src\main\java\io\flutter\plugins\firebase\core\FlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\appflutter\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.16.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.
D8: Cannot fit requested classes in a single dex file (# methods: 89543 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
请帮我。
我今天遇到了同样的问题,我找到了解决方案here https://github.com/FirebaseExtended/flutterfire/issues/1401在 Github 上
首先,从以下位置获取最新版本的依赖项pub.dev https://pub.dev
当前最新版本是这些:
firebase_auth: ^0.20.0+1
firebase_core: ^0.7.0
然后在终端中运行这3条命令:
$ flutter pub upgrade
$ flutter pub get
$ flutter clean
然后运行你的项目
$ flutter run
希望这会对您有所帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)