Closed kalexmills closed 6 years ago
I've also tried declaring transitive dependencies myself at the version required by the lib. This also does not work.
compile group: 'com.android.support', name: 'appcompat-v7', version: '20.0.0'
compile group: 'com.android.support', name: 'support-v4', version: '20.0.0'
compile group: 'com.google.android.gms', name: 'play-services-games', version: '8.4.0'
compile group: 'com.google.android.gms', name: 'play-services-plus', version: '8.4.0'
compile "de.golfgl.gdxgamesvcs:gdx-gamesvcs-android-gpgs:$gamesvcsVersion"
You don't need to use the exact version 8.4, play services up to v11.5 work. Me, I indeed use 8.4.0 in my projects. They have around 1,000 active installs (20 of this are Galaxy S6 according to the Play console) and no crashes the last 30 days, so I assume there is a problem with your project setup.
Does your emulator have installed Play services? If not, I just assume you forgot to set your app_id. This is causing an IllegalStateException. Did you try the sample app on your device?
To be clear, the emulator doesn't crash, even though Play services is not installed. It just redirects me to install play services. But on my S6 device, play services are installed, yet the app crashes whenever GpgsClient.connect() is called.
I also verified that I have two certs installed, one for release and one for debug.
I removed gsClient.resumeSession() calls from the create() and resume() methods and the app stays stable until I explicitly log in. So the crash is happening just after that call to GpgsClient.connect(). I removed the library overrides and this still occurs.
Then I get a much more helpful error message... that the APP_ID isn't specified correctly. So you were on the right track, good job... somehow I had an old package name set in the manifest... updating it to the correct package name resolves this error... but the app still crashes shortly after connect() is called.
So for a moment, I though this might have something to do with the Game Services being unpublished in the developer console, and so I published it... but that didn't make any difference and I am still seeing the crash.
I was able to resolve the issue....
Apparently the app_id metadata belongs inside the <application>
tag. 🤦♂️
Thanks @MrStahlfelge for your quick / polite response. :-)
I am glad it works now. :-)
I seem to be running into runtime errors when attempting to integrate this library. The below exception is thrown when I startup my app on my Galaxy S6, and I receive no other information.
People on the interwebs say this is an issue with missing dependencies... I know you haven't updated past Google Play 8.4.0... could this be the root cause? How would I include the missing libs along with my apk?
But I've checked and the example app doesn't seem to require that any additional dependencies are configured in gradle.build. I've tried adding some of the Google Play Services dependencies as described here anyway, but they do not resolve the issue.
Also ,this only happens on actual devices, everything seems to work fine on the emulator.
EDIT: Below are full logs: