Ok so I run my program without importing firebase core, firebase auth and cloud firestore, and my code runs just fine but I register my app with firebase and it still runs fine but as soon as I import Firebase_auth
, Firebase_core
and cloud_Firestore
... I get the following error
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.
Please help me.
How to resolve warning message: uses or overrides a deprecated api. You can resolve this warning message by using recommned API. In our example, we should use setVisible(true) rather than show() method.
A deprecated API is one that you are no longer recommended to use, due to changes in the API. While deprecated classes, methods, and fields are still implemented, they may be removed in future implementations, so you should not use them in new code, and if possible rewrite old code not to use them.
FlutterFire is a set of Flutter plugins which connect your Flutter application to Firebase.
I was having the same problem today and I found the solution here on Github
First, get the latest versions of your dependencies from pub.dev
Current latest versions are these:
firebase_auth: ^0.20.0+1
firebase_core: ^0.7.0
Then run these 3 commands in the terminal:
$ flutter pub upgrade $ flutter pub get $ flutter clean
And then run your project
$ flutter run
This will hopefully help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With