问题
I just upgraded Android Studio to version 2.2, I'm on the stable channel.
I then adjusted the build.grade file by bumping the version of compile 'com.google.firebase:firebase-auth:x.x.x'
to 9.4.0
, which is currently the latest version.
After syncing the project I am no longer able to use
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.AuthResult;
and
import com.google.firebase.auth.FirebaseUser;
The online docs for Firebase don't mention anything related to this issue.
What could be going on here?
回答1:
Currently New Version Released
com.google.firebase:firebase-core:10.2.1 Analytics
com.google.firebase:firebase-database:10.2.1 Realtime Database
com.google.firebase:firebase-storage:10.2.1 Storage
com.google.firebase:firebase-crash:10.2.1 Crash Reporting
com.google.firebase:firebase-auth:10.2.1 Authentication
com.google.firebase:firebase-messaging:10.2.1 Cloud Messaging and Notifications
com.google.firebase:firebase-config:10.2.1 Remote Config
com.google.firebase:firebase-invites:10.2.1 Invites and Dynamic Links
com.google.firebase:firebase-ads:10.2.1 AdMob
com.google.firebase:firebase-appindexing:10.2.1 App Indexing
I Hope This May Heplfull !!
回答2:
First of all latest version is not 9.4.0 it's 9.6.1 secondly. I would suggest you to do a clean - rebuild.
I would suggest you to check if you are really using latest version of gradle , all plugins and then do clean - rebuild also try file - invalidate cache and restart.
This should probably solve the issue. Do let me know if this info was helpful.
来源:https://stackoverflow.com/questions/39748193/android-firebaseuser-authcredential-and-others-not-found-after-android-studio