Flatter firebase电话身份验证问题。应用程序突然关闭

Flatter firebase电话身份验证问题。应用程序突然关闭,firebase,flutter,firebase-authentication,Firebase,Flutter,Firebase Authentication,我是Flatter的新手,我正在尝试在我的应用程序中实现firebase手机身份验证。输入手机号码后,2到3秒后,应用程序突然关闭。 phoneAuth(number) async { await authInstance.verifyPhoneNumber( phoneNumber: "+91$number", verificationCompleted: (PhoneAuthCredential credentials) async

我是Flatter的新手,我正在尝试在我的应用程序中实现firebase手机身份验证。输入手机号码后,2到3秒后,应用程序突然关闭。

phoneAuth(number) async {
    await authInstance.verifyPhoneNumber(
        phoneNumber: "+91$number",
        verificationCompleted: (PhoneAuthCredential credentials) async {
          await authInstance
              .signInWithCredential(credentials)
              .then((UserCredential userCredentials) {
            Get.to(HomeScreen());
          });
        },
        verificationFailed: (FirebaseAuthException e) {
          MyErrorPrinter.printError(
              error: e, errorTitle: "verification failed");
        },
        codeSent: (String verificationId, int resendToken) async {
          // Update the UI - wait for the user to enter the SMS code
          String smsCode;
          PhoneAuthCredential phoneAuthCredential;
          TextEditingController textController = TextEditingController();
          Get.dialog(
            Container(
              height: 300,
              child: Column(
                children: [
                  TextField(
                    controller: textController,
                  ),
                  RaisedButton(
                    onPressed: () async {
                      phoneAuthCredential = PhoneAuthProvider.credential(
                          verificationId: verificationId, smsCode: smsCode);
                      await authInstance
                          .signInWithCredential(phoneAuthCredential)
                          .then((value) => print(
                              "[][][][][][] ------ fucking execute the route here"));
                    },
                  ),
                ],
              ),
            ),
          );

          // Sign the user in (or link) with the credential
        },
        codeAutoRetrievalTimeout: (verficationId) {});
  }
在我按下执行
phoneAuth()的按钮后,以下命令将从我的控制台读取日志

W/IInputConnectionWrapper(19618):非活动InputConnection上的getTextBeforeCursor
W/IIInputConnectionWrapper(19618):在非活动InputConnection上获取SelectedText
W/IIInputConnectionWrapper(19618):非活动InputConnection上的getTextAfterCursor
E/zzf(19618):检索SafetyNet令牌时出现问题:7:
I/时间线(19618):时间线:活动启动请求时间:708035128
W/ActivityThread(19618):handleWindowVisibility:令牌android.os没有活动。BinderProxy@ad00795
D/ForceDarkHelper(19618):updateByCheckExcludeList:pkg:com.hstacks.evergy activity:com.google.firebase.auth.internal。RecaptchaActivity@ea08e50
I/chatty(19618):uid=10314(com.hstacks.evergy)相同的1行
D/ForceDarkHelper(19618):updateByCheckExcludeList:pkg:com.hstacks.evergy activity:com.google.firebase.auth.internal。RecaptchaActivity@ea08e50
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object;(灰色列表,链接,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J(greylist,核心平台api,链接,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J(greylist,核心平台api,允许链接)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V(greylist,linking,允许)
I/chatty(19618):uid=10314(com.hstacks.evergy)相同的1行
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->allocateInstance(Ljava/lang/Class;)Ljava/lang/Object;(灰色列表,链接,允许)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->peekLong(JZ)J(灰色列表,允许反射)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->博科龙(JJZ)V(灰色列表、反射、允许)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->pokeInt(JIZ)V(灰色列表,反射,允许)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->peekInt(JZ)I(灰色列表,反射,允许)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->pokeByte(JB)V(灰色列表,允许反射)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->peekByte(J)B(灰色列表,允许反射)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->pokeByteArray(J[BII)V(灰色列表,允许反射)
W/stacks.vigorou(19618):访问隐藏方法Llibcore/io/Memory;->peekByteArray(J[BII)V(灰色列表,反射,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I(greylist,核心平台api,允许链接)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->arrayindexcale(Ljava/lang/Class;)I(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J(greylist,核心平台api,允许反射)
W/stacks.vigorou(19618):访问隐藏字段Ljava/nio/Buffer;->地址:J(greylist,reflection,allowed)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I(greylist,reflection,allowed)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V(greylist,reflection,allowed)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J(greylist,核心平台api,允许反射)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V(greylist,reflection,allowed)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object;(greylist,reflection,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V(greylist,reflection,允许)
2.
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I(greylist,linking,allowed)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object;(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I(greylist,linking,allowed)
I/chatty(19618):uid=10314(com.hstacks.evergy)相同的1行
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I(greylist,linking,allowed)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V(greylist,linking,允许)
W/stacks.vigorou(19618):访问隐藏方法Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I(greylist,linking,allowed)
2.
W/stacks.vigorou(
W/IInputConnectionWrapper(19618): getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper(19618): getSelectedText on inactive InputConnection
W/IInputConnectionWrapper(19618): getTextAfterCursor on inactive InputConnection
E/zzf     (19618): Problem retrieving SafetyNet Token: 7:
I/Timeline(19618): Timeline: Activity_launch_request time:708035128
W/ActivityThread(19618): handleWindowVisibility: no activity for token android.os.BinderProxy@ad00795
D/ForceDarkHelper(19618): updateByCheckExcludeList: pkg: com.hstacks.vigorous activity: com.google.firebase.auth.internal.RecaptchaActivity@ea08e50
I/chatty  (19618): uid=10314(com.hstacks.vigorous) identical 1 line
D/ForceDarkHelper(19618): updateByCheckExcludeList: pkg: com.hstacks.vigorous activity: com.google.firebase.auth.internal.RecaptchaActivity@ea08e50
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
I/chatty  (19618): uid=10314(com.hstacks.vigorous) identical 1 line
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->allocateInstance(Ljava/lang/Class;)Ljava/lang/Object; (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->peekLong(JZ)J (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->pokeLong(JJZ)V (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->pokeInt(JIZ)V (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->peekInt(JZ)I (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->pokeByte(JB)V (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->peekByte(J)B (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->pokeByteArray(J[BII)V (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Llibcore/io/Memory;->peekByteArray(J[BII)V (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->arrayIndexScale(Ljava/lang/Class;)I (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden field Ljava/nio/Buffer;->address:J (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putLong(Ljava/lang/Object;JJ)V (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, reflection, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, reflection, allowed)
2
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
I/chatty  (19618): uid=10314(com.hstacks.vigorous) identical 1 line
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
2
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
I/zzkn    (19618): Provider GmsCore_OpenSSL not available
W/stacks.vigorou(19618): Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
V/PhoneWindow(19618): DecorView setVisiblity: visibility = 4, Parent = null, this = DecorView@1b3435e[]
D/ViewRootImpl[RecaptchaActivity](19618): hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
V/PhoneWindow(19618): DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@521d155, this = DecorView@1b3435e[RecaptchaActivity]
W/System  (19618): Ignoring header X-Firebase-Locale because its value was null.
I/System.out(19618): [okhttp]:check permission begin!
W/System  (19618): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar
I/System.out(19618): [okhttp] e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaUtils
I/System.out(19618): [socket]:check permission begin!
W/System  (19618): ClassLoader referenced unknown path: system/framework/mediatek-cta.jar
I/System.out(19618): [socket] e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaUtils
E/GraphicExt(19618): GraphicExtModuleLoader::CreateGraphicExtInstance false
D/Surface (19618): Surface::connect(this=0x7ba794c000,api=1)
D/mali_winsys(19618): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/Surface (19618): Surface::setBufferCount(this=0x7ba794c000,bufferCount=3)
D/Surface (19618): Surface::allocateBuffers(this=0x7ba794c000)
I/System.out(19618): [OkHttp] sendRequest>>
I/System.out(19618): [OkHttp] sendRequest<<
D/AndroidRuntime(19618): Shutting down VM
E/AndroidRuntime(19618): FATAL EXCEPTION: main
E/AndroidRuntime(19618): Process: com.hstacks.vigorous, PID: 19618
E/AndroidRuntime(19618): java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/browser/customtabs/CustomTabsIntent$Builder;
E/AndroidRuntime(19618):    at com.google.firebase.auth.internal.RecaptchaActivity.zza(com.google.firebase:firebase-auth@@20.0.2:13)
E/AndroidRuntime(19618):    at com.google.android.gms.internal.firebase-auth-api.zztw.zzb(com.google.firebase:firebase-auth@@20.0.2:7)
E/AndroidRuntime(19618):    at com.google.android.gms.internal.firebase-auth-api.zztw.onPostExecute(Unknown Source:2)
E/AndroidRuntime(19618):    at android.os.AsyncTask.finish(AsyncTask.java:755)
E/AndroidRuntime(19618):    at android.os.AsyncTask.access$900(AsyncTask.java:192)
E/AndroidRuntime(19618):    at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
E/AndroidRuntime(19618):    at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(19618):    at android.os.Looper.loop(Looper.java:224)
E/AndroidRuntime(19618):    at android.app.ActivityThread.main(ActivityThread.java:7551)
E/AndroidRuntime(19618):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19618):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
E/AndroidRuntime(19618):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
E/AndroidRuntime(19618): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.browser.customtabs.CustomTabsIntent$Builder" on path: DexPathList[[zip file "/data/app/com.hstacks.vigorous-Squ6-rnc2y8vbv9T1Nrxew==/base.apk"],nativeLibraryDirectories=[/data/app/com.hstacks.vigorous-Squ6-rnc2y8vbv9T1Nrxew==/lib/arm64, /data/app/com.hstacks.vigorous-Squ6-rnc2y8vbv9T1Nrxew==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
E/AndroidRuntime(19618):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
E/AndroidRuntime(19618):    at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(19618):    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(19618):    ... 12 more
I/Process (19618): Sending signal. PID: 19618 SIG: 9
Lost connection to device.
Exited (sigterm)
implementation "androidx.browser:browser:1.3.0"
dependencies {

implementation "androidx.browser:browser:1.3.0"
///
}