2016-10-25 2 views
1

Google Play Unity 플러그인으로 로그인 할 수 없습니다.이 코드는 이전에 작동했지만 지금은 작동하지 않습니다.Google Play 게임 Unity SDK에서 GameServices 객체를 만들 수 없습니다.

PlayGamesPlatform.Activate(); 
    PlayGamesPlatform.Instance.localUser.Authenticate (success => { 
    if (success) { 
     LoginType = LoginType.Google; 
     StartCoroutine(WaitForEmail()); 

    } else { 
     Debug.LogError ("Cannot Login with Gmail"); 
     return; 
    } 
    }); 

Google Play 서비스 라이브러리가 업데이트되었습니다.

10-25 19:16:37.399 17469 17488 D GamesUnitySDK: Performing Android initialization of the GPG SDK 
10-25 19:16:37.408 17469 17488 I art  : Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.games.multiplayer.ParticipantResult> 
10-25 19:16:37.409 17469 17488 I art  : Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.games.multiplayer.ParticipantResult> 
10-25 19:16:37.409 17469 17488 E GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/ParticipantResult: an exception occurred. 
10-25 19:16:37.414 17469 17488 I art  : Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.nearby.connection.AppIdentifier> 
10-25 19:16:37.414 17469 17488 I art  : Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.nearby.connection.AppIdentifier> 
10-25 19:16:37.414 17469 17488 E GamesNativeSDK: Can't register class com/google/android/gms/nearby/connection/AppIdentifier: an exception occurred. 
10-25 19:16:37.415 17469 17488 I art  : Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.nearby.connection.AppMetadata> 
10-25 19:16:37.415 17469 17488 I art  : Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.nearby.connection.AppMetadata> 
10-25 19:16:37.416 17469 17488 E GamesNativeSDK: Can't register class com/google/android/gms/nearby/connection/AppMetadata: an exception occurred. 
10-25 19:16:37.531 17469 17488 I Unity : Building GPG services, implicitly attempts silent auth 
10-25 19:16:37.531 17469 17488 I Unity : 
10-25 19:16:37.531 17469 17488 I Unity : (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42) 
10-25 19:16:37.531 17469 17488 I Unity : 
10-25 19:16:37.532 17469 17488 E GamesNativeSDK: Could not register one or more required Java classes. 
10-25 19:16:37.595 17469 17488 I Unity : InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK 
10-25 19:16:37.595 17469 17488 I Unity : at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x00000] in <filename unknown>:0 
10-25 19:16:37.595 17469 17488 I Unity : at GooglePlayGames.Native.NativeClient.InitializeGameServices() [0x00000] in <filename unknown>:0 
10-25 19:16:37.595 17469 17488 I Unity : at GooglePlayGames.Native.NativeClient.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0 
10-25 19:16:37.595 17469 17488 I Unity : at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback, Boolean silent) [0x00000] in <filename unknown>:0 
10-25 19:16:37.595 17469 17488 I Unity : at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 
10-25 19:16:37.595 17469 17488 I Unity : at GooglePlayGames.PlayGamesLocalUser.Authenticate (System.Action`1 callback) [0x00000] in <filename unknown>:0 
10-25 19:16:37.595 17469 17488 I Unity : at Controllers.LoginController.OnClickedOnGmail() [0x00000] in <filename unknown>:0 

감사 :

enter image description here

는 여기의 ADB 로그 캣 출력한다.

답변

0

Github을 기반으로 메시지 : InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK은 일반적으로 Android SDK가 너무 오래되었음을 의미합니다. Google Play 서비스, Google 저장소, Android 지원 라이브러리 및 Android 지원 리포지토리 구성 요소를 업데이트해야합니다.

아마 그 문제에 대한 또 다른 이유는 버전 8.4.0 여기 9.8.0

Google Play services API의 업데이트 된 버전의 목록입니다 재생 서비스 API 버전과 호환되지 않습니다이다.

자세한 내용은 위의 Github 링크를 확인하여 이러한 종류의 오류에 대한 다른 해결 방법을 확인하십시오.

+0

나는 이러한 종류의 예외와 관련된 많은 문제에 대해 github에서 모든 솔루션을 시도했지만 그 중 일부는 저에게 도움이되었습니다. 플러그인은 버그가있어서 업데이트해야한다고 생각합니다. 나는 당신이 "8.4.0 버전의 Play 서비스 API 버전 9.8.0과 호환되지 않는다"는 것이 무엇인지 이해하지 못했습니다. 직접 가져온 플러그인을 가져 오지 않았습니다. – AminSojoudi

관련 문제