Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

firebase - FlutterFirebaseCorePlugin.java uses or overrides a deprecated API

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:appflutterflutter.pub-cachehostedpub.dartlang.orgfirebase_core-0.7.0androidsrcmainjavaioflutterpluginsfirebasecoreFlutterFirebaseCorePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:appflutterflutter.pub-cachehostedpub.dartlang.orgcloud_firestore-0.16.0androidsrcmainjavaioflutterpluginsfirebasefirestorestreamhandlerTransactionStreamHandler.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.

question from:https://stackoverflow.com/questions/65862666/flutterfirebasecoreplugin-java-uses-or-overrides-a-deprecated-api

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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:

  1. firebase_auth: ^0.20.0+1
  2. 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...