I am using Fragment for the designing of the Firebase simple login registration.
I get error in the OnCreateView()
method on initializing
All your firebase version should be with same Version whatever it
like this
compile 'com.google.firebase:firebase-core:9.0.0'
compile 'com.google.firebase:firebase-database:9.0.0'
compile 'com.google.firebase:firebase-auth:9.0.0'
compile 'com.google.firebase:firebase-messaging:9.0.0'
Do not mix 12 and 15, use this
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
I have a also same problem.Change old version of FirebaseAuth to newer version. for me I change "com.google.firebase:firebase-auth:11.4.0"
to "com.google.firebase:firebase-auth:11.8.0"
You can easily solve this problem by getting the latest version of the Firebase Libraries for Android SDK.
You can get the latest library from https://firebase.google.com/docs/android/setup
Example:
Before:
implementation 'com.google.firebase:firebase-auth:10.6.0'
to
After:
implementation 'com.google.firebase:firebase-auth:16.0.4'
This error occurs only due to the difference in version. Whenever this kinda error occurs try to change the SDK versions, Gradle Build versions, or dependency version. If you are using
targetSdkVersion = 26
compileSdkVersion = 26
'com.android.tools.build:gradle:3.6.3'
then add this version for firebase dependencies.
implementation 'com.google.firebase:firebase-core:11.6.0'
implementation 'com.google.firebase:firebase-database:11.6.0'
implementation 'com.google.firebase:firebase-auth:11.6.0'
It works.
If you are using more than one libraries of firebase then make sure that the version are same.
Before:
compile 'com.google.firebase:firebase-database:9.2.0'
compile 'com.google.firebase:firebase-storage:9.2.0'
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:9.0.2'
After: compile 'com.google.firebase:firebase-database:9.2.0'
compile 'com.google.firebase:firebase-storage:9.2.0'
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:9.2.0'
in my case i have used auth with 9.0.2 .So i changed to 9.2.0