google leaderboard crashing my game?

Modifying post after some great help :slight_smile: updated code and tried to provide longcat(I filtered with the word “unity” seemed to work, but not sure that that was the correct option as im new to android debugging). also the crash log i filtered with the app name, seemed to get more items that way. I would also like to add that Login to google is successfull, and achivements and IAP work, only issue is the leaderboard crashing the game.

Honestly not sure what im doing wrong any help would be appreciated. I have gotten references from google play console, have all of the google play items from sdk manager. my game authenticates users just fine, but when i use the following code the game crashes as soon as i click the show leaderboard button… do i have something wrong with my code or any suggestions on how to trouble shoot this? Its ShowGLeaderboard() that causes the issue.

i have this at the top:

using GooglePlayGames;

using UnityEngine.SocialPlatforms;

using GooglePlayGames.BasicApi;

this is my code to sign into google in my start function:

	PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder ().Build ();

	PlayGamesPlatform.InitializeInstance (config);
	// recommended for debugging:
	PlayGamesPlatform.DebugLogEnabled = true;
	// Activate the Google Play Games platform
	PlayGamesPlatform.Activate ();

	LogInToGoogle ();

function to sign into google:

// Google Play Services
public void LogInToGoogle()
	Social.localUser.Authenticate((bool success) =>
        if (success)
			LoggedInToGoogle = true;
            Debug.Log("Signed Into Google");
			LoggedInToGoogle = false;
            Debug.Log("Signed Into Google Failed");

Function to show leaderboard:

public void ShowGLeaderboard()
	PlayGamesPlatform.Instance.ShowLeaderboardUI ("CgkI96qIrZYMEAIQBg");

alt text


You are activating google libraries then checking if user already logged in, if not then you are calling a function LoginToGoogle and this function is again activating google libraries

But if this is not the problem then pls build a Debug App and send us a log of your app where this crash is occurring

Make sure you are using the latest SDK for Google Play Leaderboard which is updated just few days back.
The previous version v0.9.36 doesn’t support the AARs version 10.2.0
Here is how I worked around this issue:

Go to Assets > Play Services Resolver > Android Resolver > Settings
Un-tick Enable Background resolution (This will suppress the update notifications once we downgrade the .aar files)
Go to \extras\google\m2repository\com\google\android\gms
Inside each of the folders there are version folders (such as 10.0.1, 10.2.0). And inside those are the .aar files we need.
We will need the following files:
Under \Assets\Plugins\Android delete the 10.2.0 versions of the .aar files above, with their META files.
Copy the 10.0.1 versions over
Build and run your project.
If you don’t do Step 2, Play Services Resolver will keep asking you to update these .aar files.

I hope I was able to help anyone encountering this issue.

YOU can google it: this is the site