SDKBox Play. saveGameData error

SDKBox Play. saveGameData error
0.0 0

#1

Cocos Creator 1.6.1
SDKBox 2.3.17.1
Android

I have an application error: Unfortunately, testapp has stopped, if I use cloud save without internet access. It works fine with internet access.

I followed link,
and edited sdkbox_config.json
"clound_save": false, -> "clound_save": true,
and enabled Saved Games on Google Play Console.

sdkbox.PluginSdkboxPlay.init();
sdkbox.PluginSdkboxPlay.saveGameData("name", 'test'); 

#2

could u plz post the error logcat ?


#3

The error logcat:

10-09 10:11:32.276 23524-23546/? E/dalvikvm: Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.internal.zzbil.zzf
10-09 10:11:32.361 23524-23542/? E/cocos2d-x: cocos2d: warning, Director::setProjection() failed because size is 0
10-09 10:12:10.950 23524-23809/com.fcazd.gpt E/AndroidRuntime: FATAL EXCEPTION: Thread-51636
                                                               java.lang.IllegalStateException: GoogleApiClient is not connected yet.
                                                                   at com.google.android.gms.internal.zzbeb.zze(Unknown Source)
                                                                   at com.google.android.gms.games.internal.api.zzcb.open(Unknown Source)
                                                                   at com.google.android.gms.games.internal.api.zzcb.open(Unknown Source)
                                                                   at com.sdkbox.plugin.SdkboxGPGSavedGames.saveGameDataReal(SdkboxGPGSavedGames.java:150)
                                                                   at com.sdkbox.plugin.SdkboxGPGSavedGames.access$100(SdkboxGPGSavedGames.java:23)
                                                                   at com.sdkbox.plugin.SdkboxGPGSavedGames$2.run(SdkboxGPGSavedGames.java:106)
                                                                   at java.lang.Thread.run(Thread.java:838)

#4
sdkbox.PluginSdkboxPlay.init();
if (sdkbox.PluginSdkboxPlay.isSignedIn()) {
    sdkbox.PluginSdkboxPlay.saveGameData("name", 'test'); 
}

UP: 2017-10-10
I add a test case with 2.3.17.1 here https://github.com/sdkbox/sdkbox-sample-sdkboxplay/blob/master/js/src/app.js#L177 without any crash.

try with creator and report later.

REPRODUCED it

here is a hotfix jar PluginSdkboxPlay.jar.zip (51.3 KB), thanks for your report.


#5

It works correct now.
Thanks.

Will this fix be added to a next version sdkbox?


#6

yes, we’ll make a small release for review 2.3.17.2.


#7

just release a hotfix release for SDKBoxPlay & Review 2.3.17.2 plugins.
U can update with command:

sdkbox update -s main --nohelp

Thanks,