Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android应用程序,谷歌登录,仅用于web部署_Android_Angular_Cordova_Ionic Framework_Google Login - Fatal编程技术网

android应用程序,谷歌登录,仅用于web部署

android应用程序,谷歌登录,仅用于web部署,android,angular,cordova,ionic-framework,google-login,Android,Angular,Cordova,Ionic Framework,Google Login,我在这里向你们展示一个问题,我在我用Cordova制作的Angular Android应用程序中使用谷歌插件登录时遇到了这个问题 要使插件codetrix studio/google auth正常工作,这是一个复杂的配置。最后,我找到了解决方案,在构建了ionic应用程序并在我的浏览器上进行了测试后,我的localhost:8100获得了授权,它成功了。我打印了输出数据,如下所示: 然后,为了检查登录是否真的有效,我运行了命令:“ionic cap copy”和“ionic cap sync”

我在这里向你们展示一个问题,我在我用Cordova制作的Angular Android应用程序中使用谷歌插件登录时遇到了这个问题

要使插件codetrix studio/google auth正常工作,这是一个复杂的配置。最后,我找到了解决方案,在构建了ionic应用程序并在我的浏览器上进行了测试后,我的localhost:8100获得了授权,它成功了。我打印了输出数据,如下所示:

然后,为了检查登录是否真的有效,我运行了命令:“ionic cap copy”和“ionic cap sync”。然后使用“ionic cap open android”启动,在使用我想登录的帐户选择后,我出现了以下错误:

这是我为登录调用的方法的代码。我不知道具体的错误是什么,可能是一些配置错误。如果你需要额外的代码或一些额外的细节,我很乐意给你

先谢谢你♥

 async doGoogleLogin(){
    this.userInfo="Started";
    let googleUser = null;
    try{
      googleUser= await Plugins.GoogleAuth.signIn();
    }catch(err){
      this.error = err;
    }

    if(googleUser!= null){
      console.log(googleUser)
      this.userInfo = "! LOGGED AS : " + googleUser.email + "\n" 
                       +googleUser.authentication.accessToken + " " + googleUser.serverAuthCode;
    }else{
      this.userInfo = "null";
      googleUser= await Plugins.GoogleAuth.signIn().catch(x => {
        this.userInfo = x;
      });
    }

  }