After updating the libraries into the Gradle file, I run into this error after trying to authenticate through the phone number.
--------- beginning of crash
2020-11-04 00:33:11.574 23042-23042/com.roko.hearth E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.roko.hearth, PID: 23042
java.lang.NoSuchMethodError: No virtual method verifyPhoneNumber(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/Executor;Lcom/google/firebase/auth/PhoneAuthProvider$OnVerificationStateChangedCallbacks;Lcom/google/firebase/auth/PhoneAuthProvider$ForceResendingToken;)V in class Lcom/google/firebase/auth/PhoneAuthProvider; or its super classes (declaration of 'com.google.firebase.auth.PhoneAuthProvider' appears in /data/app/com.roko.hearth-BB3VSAScHPWVlEGN0MD3dw==/base.apk!classes2.dex)
at com.firebase.ui.auth.ui.phone.PhoneNumberVerificationHandler.verifyPhoneNumber(PhoneNumberVerificationHandler.java:32)
at com.firebase.ui.auth.ui.phone.CheckPhoneNumberFragment.onNext(CheckPhoneNumberFragment.java:164)
at com.firebase.ui.auth.ui.phone.CheckPhoneNumberFragment.onClick(CheckPhoneNumberFragment.java:140)
at android.view.View.performClick(View.java:7140)
at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992)
at android.view.View.performClickInternal(View.java:7117)
at android.view.View.access$3500(View.java:801)
at android.view.View$PerformClick.run(View.java:27351)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
I searched for a solution but the same problem
I have these libraries for the firebase into the Gradle
// Firebase
implementation platform('com.google.firebase:firebase-bom:26.0.0')
//Firebase Authentication
implementation 'com.google.firebase:firebase-auth'
implementation 'com.firebaseui:firebase-ui-auth:6.2.1'
//Firebase Database
implementation 'com.google.firebase:firebase-database'
implementation 'com.firebaseui:firebase-ui-database:6.2.1'
//Firebase Messaging
implementation 'com.google.firebase:firebase-messaging'
//Firebase Storage
implementation 'com.google.firebase:firebase-storage'
implementation 'com.google.firebase:firebase-perf'
implementation 'com.google.firebase:firebase-core'
/////////////////////////////////////////////////////////////////////////////
And the SHA-1 code is the same. Can someone help, please?
implementation platform('com.google.firebase:firebase-bom:26.1.0')
implementation 'com.google.firebase:firebase-auth'
implementation 'com.firebaseui:firebase-ui-auth:7.0.0'
this is the real correction ;)
you just need to update firebaseUI to the latest version
implementation 'com.firebaseui:firebase-ui-auth:7.1.0' //or higher
it means if you use the latest firebase you need to use the latest firebaseUI as mentioned here https://github.com/firebase/FirebaseUI-Android/issues/1868
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