本文介绍了MissingPluginException(未在渠道plugins.flutter.io/google_sign_in上找到方法init的实现)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Flutter的Google登录名

Using Flutter's google sign_in

但是当我使用此语句登录用户时看到以下消息

But seeing the following message when I use this statement to sign in a user

_googleSignIn.signIn();

我验证了以下步骤:

GoogleSignInPlugin.registerWith(registry.registrarFor("io.flutter.plugins.googlesignin.GoogleSignInPlugin")); // is present

GeneratedPluginRegistrant.registerWith(this); // in MainActivity.Java

此错误是用户经常报告的错误.不知道如何进行.我正在执行大多数文档所说的操作,但是仍然行不通.

Is this error frequently reported by users. Not sure how to proceed. I am doing what most of the docs say and yet it doesn't work.

我看到的其他怪异行为是,第一次运行flutter运行时,它卡在了googleSignIn.SignIn()上.

Other weird behavior I see is, first time I run flutter run it gets stuck on await googleSignIn.SignIn().

只有在我执行热重载(通过键入"r")之后,我才会看到上述错误消息:

Only after I do a hot reload (by typing "r"), I see the above error message of :

问题:在Flutter应用程序上是否有其他方法可以进行基本身份验证.我只需要某种基本的身份验证,以便我的服务器可以知道它正在向哪个用户提供数据.

Question: Are there any alternatives to do basic auth on Flutter applications. I just need some kind of basic auth so that my server can know which user it is serving data to.

推荐答案

运行flutter clean并完全重新启动IDE和应用程序.这将解决它.

Runflutter clean and restart IDE and app completely . This will fix it.

这篇关于MissingPluginException(未在渠道plugins.flutter.io/google_sign_in上找到方法init的实现)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 06:33