2016-10-25 27 views
1

Google Play Unityプラグインでログインできません。このコードは以前は動作していましたが、動作していません。Google Play Games 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のlogcat出力です。

答えて

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では、ここでプレイサービスAPIバージョン9.8.0

と互換性がありませんGoogle Play services APIの更新バージョンのリストです。

詳細については、上記のGithubのリンクをチェックして、この種のエラーの他の解決方法を確認してください。

+0

この種の例外に関連する多くの問題についてgithubのすべてのソリューションを試しましたが、それらのものは私のために働いていませんでした。プラグインはバグであり、更新する必要があると思います。 「バージョン8.4.0はPlayサービスAPIバージョン9.8.0と互換性がありません」と私は理解していませんでしたが、自分でプラグインをインポートしたライブラリをインポートしませんでした。 – AminSojoudi

関連する問題