Hi, Dear all..
i'm success integration Google Play Game Service with CocosCreator,
SDKBOX - Plugin Version: 1.0.3
Google Play Services Version:
when i put apk to phone to running,
i'm always getting error ..
Exception in com/google/android/gms/games/Games.getGamesServerAuthCode: java.lang.IllegalArgumentException: Please provide a valid serverClientId.
here is my JavaScript code ..
var config = new gpg.PlatformConfiguration();
config.SetClientID('239759943429-3v8bd9ea3j1vcmq7c965ic8deq7gs2gh.apps.googleusercontent.com');
cc.log( '[GPG] Start Build Game Service.' );
new gpg.GameServices.Builder()
.SetOnAuthActionStarted( function( result )
{
cc.log( '[GPG] on auth started: ' + result.AuthOperation + '\n' );
})
.SetOnAuthActionFinished( function( result )
{
cc.log( '[GPG] on auth finished: ' + result.AuthOperation + ' -> ' + result.AuthStatus + '\n';
})
.SetLogging( gpg.LogLevel.VERBOSE ) // Set Logging level
//.EnableSnapshots() // Enable Snapshot (Saved Game) functionailty
.Create( function( game_services )
{
cc.log( 'Game Services Created!!!!\n' );
} );
cc.log( '[GPG] End Build Game Service.' );
and my part adb log is..
V/GamesNativeSDK(20912): Play Games callback indicates connection.
W/GamesServiceBroker( 4298): Client connected with SDK 8487000, Services 10298030, and Games 39080030
I/GamesNativeSDK(20912): Successfully connected to Google Play.
V/GamesNativeSDK(20912): WelcomeBack Notification UI should be displayed by GMSCore.
V/GamesNativeSDK(20912): ApplicationMetadataCache is not being seeded; this is normal on non-iOS platforms.
V/GamesNativeSDK(20912): PlayerLevelCache is not being seeded; this is normal on Android.
V/GamesNativeSDK(20912): QuestCache is not being seeded; this is normal on Android.
D/dalvikvm( 4298): GC_FOR_ALLOC freed 502K, 48% free 15774K/30120K, paused 36ms, total 36ms
I/dalvikvm-heap( 4298): Grow heap (frag case) to 17.425MB for 921616-byte allocation
E/SMD (20633): smd Interface open failed errno is 2 -1
D/dalvikvm( 4298): GC_FOR_ALLOC freed 19K, 47% free 16655K/31024K, paused 32ms, total 32ms
E/GamesNativeSDK(20912): Exception in com/google/android/gms/games/Games.getGamesServerAuthCode: java.lang.IllegalArgumentException: Please provide a valid serverClientId.
F/libc (20912): !@Fatal signal 11, thread 20956
F/libc (20912): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 20956 (main_dispatch)
W/AppOps ( 3383): Bad call: specified package com.google.android.play.games under uid 10291 but it is really 10127
W/AppOps ( 3383): Bad call: specified package com.google.android.play.games under uid 10291 but it is really 10127
W/AppOps ( 3383): Bad call: specified package com.google.android.play.games under uid 10291 but it is really 10127
W/AppOps ( 3383): Bad call: specified package com.google.android.play.games under uid 10291 but it is really 10127
I/DEBUG ( 2824): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 2824): Build fingerprint: 'samsung/trhpltexx/trhplte:4.4.4/KTU84P/N910UXXU1ANL4:user/release-keys'
you can see the GamesNativeSDK says "Successfully connected to Google Play."
but next get Exception in "Games.getGamesServerAuthCode"....
my strings.xml is
<?xml version='1.0' encoding='UTF-8'?>
<resources>
<string name="app_name" translatable="false">SDKBOX</string>
<string name="google_app_id">239759943429</string>
<string name="service_id">239759943429-3v8bd9ea3j1vcmq7c965ic8deq7gs2gh.apps.googleusercontent.com</string>
</resources>
i don't know why i'm always get the error,
alos trying google it by no any useful information...
please help me , thank you so much ![:joy: :joy:]()