#android #flutter #dart #google-play-services #google-play-games
Вопрос:
Я интегрирую игровые сервисы Google Play с моим приложением flutter. Я использовал ElevatedButton(child: const Text('Sign In'),onPressed: () async {await GamesServices.signIn();},),
. Открылось всплывающее окно, которое заставило меня впервые загрузить приложение Play Games. Теперь всякий раз, когда я нажимаю на эту кнопку, открывается всплывающее окно, оно начинает загружаться, продолжает загружаться и выдает исключение Unhandled Exception: PlatformException(error, Something went wrong Status{statusCode=unknown status code: 12501, resolution=null}, null, null)
, которое я правильно добавил app_id
в ids.xml
файл. Имя пакета и SHA 1 key
то и другое совпадают в консоли Google Play и в проекте firebase.
E/Error (29740): com.google.android.gms.common.api.ApiException: 4: 4: E/Error (29740): at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(com.google.android.gms:play-services-base@@17.4.0:4) E/Error (29740): at com.google.android.gms.common.internal.zan.zaa(com.google.android.gms:play-services-base@@17.4.0:2) E/Error (29740): at com.google.android.gms.common.internal.zap.onComplete(com.google.android.gms:play-services-base@@17.4.0:6) E/Error (29740): at com.google.android.gms.common.api.internal.BasePendingResult.zab(com.google.android.gms:play-services-base@@17.4.0:177) E/Error (29740): at com.google.android.gms.common.api.internal.BasePendingResult.setResult(com.google.android.gms:play-services-base@@17.4.0:136) E/Error (29740): at com.google.android.gms.auth.api.signin.internal.zzk.zzc(com.google.android.gms:play-services-auth@@19.0.0:5) E/Error (29740): at com.google.android.gms.auth.api.signin.internal.zzu.zzc(com.google.android.gms:play-services-auth@@19.0.0:6) E/Error (29740): at com.google.android.gms.internal.auth-api.zzc.onTransact(com.google.android.gms:play-services-auth@@19.0.0:13) E/Error (29740): at android.os.Binder.execTransact(Binder.java:739) I/ExplicitSignIn(29740): Trying explicit sign in D/ZrHung.AppEyeUiProbe(29740): stop checker. W/ActivityThread(29740): handleWindowVisibility: no activity for token android.os.BinderProxy@e4a5ea9 D/ZrHung.AppEyeUiProbe(29740): notify runnable to start. V/ActivityThread(29740): Skipping new config:{1.0 410mcc1mnc [en_GB] ldltr sw360dp w360dp h686dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(0, 60 - 720, 1432) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.10}, config:{1.0 410mcc1mnc [en_GB] ldltr sw360dp w360dp h686dp 320dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 0, 0) mAppBounds=Rect(0, 60 - 720, 1432) mWindowingMode=fullscreen mActivityType=undefined} nonFullScreen=0 suim:1 s.10} for app:com.karmababies.gamepass V/ActivityThread(29740): callActivityOnCreate D/HiTouch_PressGestureDetector(29740): HiTouch on notch display, height corret:60 D/ActivityThread(29740): add activity client record, r= ActivityRecord{cb76306 token=android.os.BinderProxy@e4a5ea9 {com.karmababies.gamepass/com.google.android.gms.auth.api.signin.internal.SignInHubActivity}} token= android.os.BinderProxy@e4a5ea9 D/ZrHung.AppEyeUiProbe(29740): notify runnable to start. D/OpenGLRenderer(29740): HWUI Binary is enabled D/HwAppInnerBoostImpl(29740): asyncReportData com.karmababies.gamepass,2,1,1,0 interval=973 D/ZrHung.AppEyeUiProbe(29740): stop checker. W/HiTouch_HiTouchSensor(29740): depended package hiTouch does n't exist! I/HiTouch_HiTouchSensor(29740): HiTouch restricted: system app HiTouch don't exist. D/OpenGLRenderer(29740): HWUI Binary is enabled I/ViewRootImpl(29740): jank_removeInvalidNode all the node in jank list is out of time D/ZrHung.AppEyeUiProbe(29740): Current Activity:false D/ZrHung.AppEyeUiProbe(29740): not watching, wait. D/ZrHung.AppEyeUiProbe(29740): notify runnable to start. D/ZrHung.AppEyeUiProbe(29740): restart watching W/InputMethodManager(29740): startInputReason = 1 D/ZrHung.AppEyeUiProbe(29740): stop checker. I/silentSignIn(29740): error D/ZrHung.AppEyeUiProbe(29740): notify runnable to start. E/flutter (29740): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, Something went wrong Status{statusCode=unknown status code: 12501, resolution=null}, null, null) E/flutter (29740): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7) E/flutter (29740): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18) E/flutter (29740): lt;asynchronous suspensiongt; E/flutter (29740): #2 MethodChannelGamesServices.signIn (package:games_services_platform_interface/method_channel_games_services.dart:46:14) E/flutter (29740): lt;asynchronous suspensiongt; E/flutter (29740): #3 GamesServices.signIn (package:games_services/games_services.dart:58:12) E/flutter (29740): lt;asynchronous suspensiongt; E/flutter (29740): #4 _MyHomePageState.build.lt;anonymous closuregt; (package:game_pass/main.dart:44:32) E/flutter (29740): lt;asynchronous suspensiongt; E/flutter (29740): W/InputMethodManager(29740): startInputReason = 1 D/ViewRootImpl[SignInHubActivity](29740): surface should not be released D/ActivityThread(29740): Remove activity client record, r= ActivityRecord{cb76306 token=android.os.BinderProxy@e4a5ea9 {com.karmababies.gamepass/com.google.android.gms.auth.api.signin.internal.SignInHubActivity}} token= android.os.BinderProxy@e4a5ea9 E/ion (29740): [74]ioctl c0044901 failed with code -1: Invalid argument E/ion (29740): [74]ioctl c0044901 failed with code -1: Invalid argument