2015-06-19 126 views
1

我用official Google plugin for Unity3D讓我在遊戲中的成就和lederboards,但是當我嘗試調用谷歌播放登錄我得到了一個錯誤:谷歌播放服務和Unity3D錯誤

E/GamesNativeSDK﹕ Exception in dalvik/system/DexClassLoader.loadClass: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.NativeSdkEntryPoints" on path: DexPathList[[zip file "/data/data/com.crazylabs.tabreak/app_.gpg.classloader/de80b70ed0da0dfe988a41fa560612ee.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]. 
06-19 18:02:45.058 25436-27013/? E/ValidateServiceOp﹕ Missing metadata tag with the name "com.google.android.gms.appstate.APP_ID" in the application tag of the manifest for com.company.game 
06-19 18:02:45.105 25436-27012/? E/ValidateServiceOp﹕ Using Google Play games services requires a metadata tag with the name "com.google.android.gms.games.APP_ID" in the application tag of the manifest for 

Android清單:

.... 
<meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="xxxxxxxxxxxxx" /> 
.... 

回答

1

您正在使用com.google.android.gms.appstate.APP_ID,當錯誤表示您需要com.google.android.gms.games.APP_ID

另請確保您將元數據標籤放入清單中的<application>標籤內。

最後,您應該使用字符串文件夾中的android:value屬性的應用程序ID。最後它應該看起來像這樣:

<application> 
    ... 
    <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" /> 
    .... 
</application> 

希望有所幫助!