Google Play Games "Invalid classname: Object reference not set to an instance of an object"

I can’t set up google play games for android. After pressing the setup button, I just get “Invalid classname: Object reference not set to an instance of an object.” How can I fix this?

Google Play Games plugin version: 0.10.12

Unity Editior version 2021.3.16f1

Bump!

No different than every other nullref!

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null ← any other action taken before this step is WASTED TIME
  • Identify why it is null
  • Fix that

In the case of Google Play Games, their integration must be followed absolutely to a tee or it won’t work, so you may wish to go back over the steps you did to integrate it.

8861157--1209072--upload_2023-3-8_20-54-46.png

still confused how to fix this

Same issue here! it seems its some bug related with the Google Play Games SDK ( at least, it’s last version 0.11.01).
Still can’t find any solution.

Hello, did you find the solution?, I have the same bug, I think maybe is the “Constant class name”, but I don’t know what to write?

It worked for me:

Before importing the unity package for v0.11.1, delete Assets/Plugins/Android/com.google.android.gms.play-services-games-<version_number>.aar and everything under Assets/GooglePlayGames**(THEN RESTART UNITY)** .
You can then follow the regular integration process.

What helped me was to run the ExternalDependencyManager again.

Assets → External Dependency Manager → Android Resolver → Delete Resolved Libs
Assets → External Dependency Manager → Android Resolver → Resolve

I change in. - project settings / player / other settings (api compatibility level ) .NET Framework (not Net standard 2.1)

I had originally overidden my package name which might have conflicted with the package name given in the Google Cloud Platform.

After a full restart of my project, it worked.