Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Google Play Game Services - Plugin Help

Discussion in 'Android' started by ariyalion, Feb 18, 2014.

  1. ariyalion

    ariyalion

    Joined:
    Feb 15, 2014
    Posts:
    19
    I installed this https://github.com/playgameservices/play-games-plugin-for-unity to show a leaderboard in my game. When I run the game on a device,during authentication the following message is throwm at adb console. For me it sounded like the android complaining about googleplay-service package is missing. But, i can definitely say it is there under sdk/extras/google. And what is that " NullReferenceException: Object reference not set to an instance of an object" in the stacktrace? What has gone wrong? Anyone has any ideas? Thanks in advance.

    AndroidJavaException: java.lang.ClassNotFoundException: com.google.example.games.basegameutils.GameHelper
    at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJavaObject._CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJavaObject.CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJavaObject..ctor (System.String className, System.Object[] args) [0x00000] in <filename unknown>:0
    at GooglePlayGames.A
    NullReferenceException: Object reference not set to an instance of an object
    at GooglePlayGames.Android.AndroidClient+<Authenticate>c__AnonStorey1.<>m__1 () [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJavaRunnableProxy.run () [0x00000] in <filename unknown>:0
    at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    Rethrow as TargetInvocationException: UnityEngine.AndroidJavaRunnableProxy.run()
    at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
    at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, UnityEngine.AndroidJavaObject[] javaArgs) [0x00000] in <filename unknown>:0
    at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, IntPtr jmethodName, IntPtr jargs) [0x00000] in <filename unknown>:0


    Update:

    I found out that missing class is basically provided by the plugin. Therefore, I downloaded the source and ran everything in the ADT. Still it was giving the same error. Now I have started to doubt my sanity. IMy brain cell must be dying.

    $Screen Shot 2014-02-18 at 11.24.48 pm.png

    $Screen Shot 2014-02-18 at 11.25.38 pm.png
     

    Attached Files:

    Last edited: Feb 18, 2014
  2. ariyalion

    ariyalion

    Joined:
    Feb 15, 2014
    Posts:
    19
  3. ariyalion

    ariyalion

    Joined:
    Feb 15, 2014
    Posts:
    19
    The Current version published on Feb 20 2014 works well.
     
  4. Deleted

    Deleted

    Joined:
    Dec 8, 2012
    Posts:
    16
    I'm having the same problem with the latest version of the plugin... Everything looks ok on both sides (dashboard and code)... Can you help me?
     
  5. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    I am experiencing the same, so if anyone has a clue, that would be greatly appreciated!
     
  6. tsubaki_t1

    tsubaki_t1

    Joined:
    Jul 2, 2012
    Posts:
    29
    Last edited: Apr 1, 2014
  7. tsubaki_t1

    tsubaki_t1

    Joined:
    Jul 2, 2012
    Posts:
    29