凭证对话框(Google表单)已成功打开,但是在填写凭证后出现此错误。我遵循了这里的指示。创建了一个Firebase项目,并从Google API控制台启用了Google Drive API(现在是我现在所需要的)。
代码抛出异常:
final GoogleSignIn _googleSignIn = GoogleSignIn(
scopes: [
'https://www.googleapis.com/auth/drive',
],
);
await _googleSignIn.signIn();
Run Code Online (Sandbox Code Playgroud)
那是堆栈跟踪:
E/flutter ( 5068): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception:
E/flutter ( 5068): PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
E/flutter ( 5068): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:551:7)
E/flutter ( 5068): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:292:18)
E/flutter ( 5068): <asynchronous suspension>
E/flutter ( 5068): #2 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:226:58)
E/flutter ( 5068): <asynchronous suspension>
E/flutter ( 5068): #3 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:268:20)
E/flutter ( 5068): #4 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:339:48)
E/flutter ( 5068): #5 …Run Code Online (Sandbox Code Playgroud)