没有虚拟方法verifyPhoneNumber,致命异常:main [英] No virtual method verifyPhoneNumber, FATAL EXCEPTION: main

查看:80
本文介绍了没有虚拟方法verifyPhoneNumber,致命异常:main的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将库更新为Gradle文件后,尝试通过电话号码进行身份验证后,我遇到了此错误.

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

我将这些用于Firebase的库放到了Gradle中

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'

/////////////////////////////////////////////////////////////////////////////

与SHA-1代码相同.有人可以帮忙吗?

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'

这是真正的更正;)

这篇关于没有虚拟方法verifyPhoneNumber,致命异常:main的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆