简体   繁体   中英

Google Play Services and Unity3D error

I use official Google plugin for Unity3D to get achievements and lederboards in my game, but when I try to call Google Play Login I got an error:

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 manifest:

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

You are using com.google.android.gms.appstate.APP_ID , when the error says you need com.google.android.gms.games.APP_ID .

Also: Make sure you are placing the meta data tag within the <application> tag in your manifest.

Lastly, you should be using the app id from the strings folder for the android:value attribute. In the end it should look like this:

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

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM