I made a game that uses Google Play leaderboards. It posts scores and shows the leaderboard just fine, however, when you go back to the game the app crashes showing a message that says "Unfortunately, The Game has stopped".
I'm wondering if it has anything to do with having both AdMob and the leaderboards, taking in count both use the Google Play library. I must mention that I updated
@ar2rsawseen's Java file for AdMob to the current SDK, but I already asked him to check if it is okay. However, I suspect it might have something to do with having the new SDK system with the old .so libs. As my knowledge in this area is very limited I ask if anyone can help or point me in the right direction.
Has this or something similar happened to anyone?
Comments
I didn't find the proper drivers for my device so I just export the project every time and therefore don't see the logcat in Eclipse
My basket game also use Google Play leaderboards. In this case I test it in a device with Google Play Services installed but the process is waiting in the sentence "game:login()". I have listeners for Event.LOGIN_COMPLETE / Event.LOGIN_ERROR, etc. but nothing received there.
For me the logcat issue this error:
08-07 00:47:14.567: E/dalvikvm(2791): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.b
08-07 00:47:14.567: E/dalvikvm(2791): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.b
08-07 00:47:14.617: E/GooglePlayServicesUtil(2791): GooglePlayServices not available due to error 2
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
GooglePlayServices not available due to error 2
usually means that on your device, you have older version of Google Play Services Framework installed, than is needed by Google Play Services lib you are using in your app.
Do this mean the users have to update it in their devices in order to use the leaderboard with the game?
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
You create app, everything works, and then they release new version on the phones and mess up something, and you (well not just you, all developers) get thousands of crashes. Happened to me once or twice already
is there anything in logcat coming after "GooglePlayServices not available due to error 2" error?
https://deluxepixel.com
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
"
You uploaded an APK that uses Google Play services version 5077000. This will only work with Android API levels of 9 and above. It is discouraged to use this Google Play services version unless you have set the minSdkVersion in your manifest to 9 or higher.
"
The Google Play version is the one you put in the Ads interface plugin (last version).
I have minSdkVersion="8" in the manifest (as you have for your apps also).
What I have to do now? May I have to change to 9 (disallowing in this way many devices to execute my game) or to downgrade the Google Play version?
I need to upload it asap.
Thanks.
:-/
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
There is also Google Play Services api level 8 version, but it does not have all the features that are in the latest Google Play Services.
And, as pretty much all ad networks soon will require advertising id (which can be found only in Google Play Services), basically Google forces, that all new apps won't be compatible with Android api level 8
Thanks.
https://play.google.com/store/apps/developer?id=SimplesApps
http://www.amazon.com/gp/mas/dl/android?p=com.simplesapps.actionbasket
https://itunes.apple.com/artist/david-rodriguez/id763996989
08-12 15:42:43.963: D/skia(26559): Flag is not 10
08-12 15:42:43.981: D/AndroidRuntime(26559): Shutting down VM
08-12 15:42:43.981: W/dalvikvm(26559): threadid=1: thread exiting with uncaught exception (group=0x411029a8)
08-12 15:42:43.985: E/AndroidRuntime(26559): FATAL EXCEPTION: main
08-12 15:42:43.985: E/AndroidRuntime(26559): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=9001, result=10002, data=null} to activity {com.giddelcreations.directioner/com.giderosmobile.android.DirectionerActivity}: java.lang.NullPointerException
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.app.ActivityThread.deliverResults(ActivityThread.java:3488)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3531)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.app.ActivityThread.access$1100(ActivityThread.java:156)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1388)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.os.Handler.dispatchMessage(Handler.java:99)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.os.Looper.loop(Looper.java:153)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.app.ActivityThread.main(ActivityThread.java:5299)
08-12 15:42:43.985: E/AndroidRuntime(26559): at java.lang.reflect.Method.invokeNative(Native Method)
08-12 15:42:43.985: E/AndroidRuntime(26559): at java.lang.reflect.Method.invoke(Method.java:511)
08-12 15:42:43.985: E/AndroidRuntime(26559): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
08-12 15:42:43.985: E/AndroidRuntime(26559): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
08-12 15:42:43.985: E/AndroidRuntime(26559): at dalvik.system.NativeStart.main(Native Method)
08-12 15:42:43.985: E/AndroidRuntime(26559): Caused by: java.lang.NullPointerException
08-12 15:42:43.985: E/AndroidRuntime(26559): at com.giderosmobile.android.DirectionerActivity.onActivityResult(DirectionerActivity.java:278)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.app.Activity.dispatchActivityResult(Activity.java:5311)
08-12 15:42:43.985: E/AndroidRuntime(26559): at android.app.ActivityThread.deliverResults(ActivityThread.java:3484)
08-12 15:42:43.985: E/AndroidRuntime(26559): ... 11 more
08-12 15:42:44.126: D/dalvikvm(26559): threadid=13: interp stack at 0x56666000
Thanks in advance for your help!
Can you send me your signed apk file, so I can do some tests, so my nickname at gmail.com?
Did you use the latest version of Google Play plugin from Github?
https://github.com/ar2rsawseen/GiderosGooglePlay
The last update was about 2 months ago
Yeah I used that. I downloaded it again when I build the project to make sure. I did so again today in case I did something wrong but had the same result. Do you have any suspicions as to where this might be pointing to?
I was thinking whole evening and could not come up with what was wrong, thinking different scenarios, if you forget to define this or that etc. But nothing.
And I can't reproduce the error when I create new project with same plugin.
Last resort, you can try sending me your exported android project to the same email address, and I will try to tweak your code to see what is exactly going on there
I even made a simple project only to send a score to the leaderboard and check it and the same happened. I exported the assets only to replace as it was the full game though, naming the package the same as the real one. I'd probably try it doing it from scratch.
No pressure, it's just I'm stuck at this point and the things I've tried haven't worked
Will check it out today, promise
You already have the same code in GFacebook plugin
and as you do not initiate facebook authorization, it throws null pointer exception