When I am using the latest implementation com.google.android.gms:play-services-games:21.0.0 I get the following errors when trying to create gpg::GameServices object:
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/Invitation: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/InvitationBuffer: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/Invitations: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/Invitations$LoadInvitationsResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/Multiplayer: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/Participant: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/ParticipantResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/LoadMatchesResponse: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMatch: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMatchBuffer: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMatchConfig: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMatchConfig$Builder: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer$CancelMatchResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer$InitiateMatchResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer$LeaveMatchResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer$LoadMatchesResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer$LoadMatchResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/turnbased/TurnBasedMultiplayer$UpdateMatchResult: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/realtime/RealTimeMessageReceivedListener: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/realtime/RealTimeMultiplayer: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/realtime/RealTimeMessage: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/realtime/Room: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/realtime/RoomConfig: an exception occurred.
E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/realtime/RoomConfig$Builder: an exception occurred.
E/GamesNativeSDK: Could not register one or more required Java classes.
I am fully aware that Google has ended support for multiplayer APIs on March 31, 2020 and it seems that version 21 of play games services is the first version in which that functionality has actually been removed, which would explain why initialization fails. However, my app does not use any multiplayer APIs, so the problem is entirely on Google's side, possibly in one of the dependencies trying to access those APIs.
Here is a full list of my dependencies for reference:
After weeks of trying various combinations fo versions I came up with the following workaround: if I downgrade version to com.google.android.gms:play-services-games:20.0.0, which is the latest version where those classes were still present, as well as include an additional package not mentioned in the documentation as relevant to anything I do: com.google.android.gms:play-services-nearby:18.0.0 I end up not getting any E/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/xxxxxx: an exception occurred. errors and am able to successfully create gpg::GameServices object.
Again, I don’t use any of the multiplayer functionality or nearby discovery so I guess one of your dependencies either in GPGS or in Firebase must be causing the problem.
When I am using the latest implementation
com.google.android.gms:play-services-games:21.0.0
I get the following errors when trying to creategpg::GameServices
object:I am fully aware that Google has ended support for multiplayer APIs on March 31, 2020 and it seems that version 21 of play games services is the first version in which that functionality has actually been removed, which would explain why initialization fails. However, my app does not use any multiplayer APIs, so the problem is entirely on Google's side, possibly in one of the dependencies trying to access those APIs.
Here is a full list of my dependencies for reference:
After weeks of trying various combinations fo versions I came up with the following workaround: if I downgrade version to
com.google.android.gms:play-services-games:20.0.0
, which is the latest version where those classes were still present, as well as include an additional package not mentioned in the documentation as relevant to anything I do:com.google.android.gms:play-services-nearby:18.0.0
I end up not getting anyE/GamesNativeSDK: Can't register class com/google/android/gms/games/multiplayer/xxxxxx: an exception occurred.
errors and am able to successfully creategpg::GameServices
object.Again, I don’t use any of the multiplayer functionality or nearby discovery so I guess one of your dependencies either in GPGS or in Firebase must be causing the problem.
P.S. Versions not mentioned above: