谷歌搜索后,我无法找到这个问题的答案.Google Play商店是否正式支持avd模拟器.
我知道它曾经停止过,然后我听说它是在特定版本的android之后被带回来的.我正在使用avd android版本4.4.3(api 19)谷歌应用程序.我没有在那里看到谷歌游戏商店应用程序.我想是期待它吗?或者是否有正式的apk for google play store可以正式安装在avd上?
我正在尝试将Google登录集成到我的应用中.我没有后端服务器,我只是将登录的Google帐户的详细信息提供给我的应用程序.
我首先尝试使用Google登录示例,但是我收到了一个错误(除了打印下面的堆栈跟踪之外,没有更改代码).我只使用了示例SignInActivity,因为我没有后端服务器.
Exception com.google.android.gms.common.api.ApiException: 12500:
at com.google.android.gms.common.internal.zzb.zzz(Unknown Source)
at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source)
at com.ewise.android.api.MainActivity.onActivityResult(SignInActivity.java:89) at android.app.Activity.dispatchActivityResult(Activity.java:7010)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4187)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4234)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Run Code Online (Sandbox Code Playgroud)
码
public class SignInActivity extends AppCompatActivity implements
View.OnClickListener {
private static final String TAG = "SignInActivity";
private static final int RC_SIGN_IN = 9001;
private GoogleSignInClient mGoogleSignInClient;
private TextView mStatusTextView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Views
mStatusTextView = findViewById(R.id.status); …Run Code Online (Sandbox Code Playgroud) 凭证对话框(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) 我使用 Flutter 开发了一个应用程序,并使用以下命令在我的设备上进行了测试:
flutter run --release
Run Code Online (Sandbox Code Playgroud)
一切正常。我还尝试使用以下方法构建应用程序:
flutter build apk --release
Run Code Online (Sandbox Code Playgroud)
并手动安装它,仍然一切正常。
我在商店上传了,现在登录不起作用了。我尝试查看 logcat,尝试登录时出现的错误是:
I/flutter: exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null)
Run Code Online (Sandbox Code Playgroud)
我尝试添加 appCompat 依赖项并检查了 SHA1 密钥,一切都在正确的位置,我不知道为什么当我从商店下载它不再工作时。