Forum Mobile ClassNotFoundException: com.playerio.PlayCodeStorage

Anything specifically relating to droid or iOS development with Unity can go here.

ClassNotFoundException: com.playerio.PlayCodeStorage

Postby zhapness » April 8th, 2015, 10:49 am

Hi :D
I am developing a mobile game that use QuickConnect, BigDB, GameFS and GameRequests.
Everything works fine except GameRequests, when I call pioclient.GameRequests.Refresh i get this error in the log.
Anyone know of this?

Code: Select all
AndroidJavaException: java.lang.ClassNotFoundException: com.playerio.PlayCodeStorage
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 System.Reflection.MonoCMethod.Invoke (
zhapness
Paid Member
 
Posts: 6
Joined: October 12th, 2012, 10:01 am

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby zhapness » April 16th, 2015, 10:18 pm

Nothing??
zhapness
Paid Member
 
Posts: 6
Joined: October 12th, 2012, 10:01 am

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby Guillaume » May 18th, 2015, 2:11 pm

Look like a null reference exception.
Are you sure that you have imported PlayerIO library correctly ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby mgrilec » November 3rd, 2015, 9:33 am

I'm also having the same error on Android, but when I try to authenticate with a public connection. I'm using the latest SDK (3.2.425).

Code: Select all
Dictionary<string, string> arguments = new Dictionary<string, string>();
            arguments.Add("userId", userId);

            if (sharedSecret != null)
            {
                string auth = PlayerIOClient.PlayerIO.CalcAuth256(userId, sharedSecret);
                arguments.Add("auth", auth);
            }

            PlayerIOClient.PlayerIO.Authenticate(gameId, connectionId, arguments, segments, client =>
            {
               
            }, error =>
            {
               
            });


On reaching the PlayerIOClient.PlayerIO.Authenticate call, it throws the error below.

Code: Select all
11-03 09:27:36.619: I/Unity(24253): AndroidJavaException: java.lang.ClassNotFoundException: com.playerio.PlayCodeStorage
11-03 09:27:36.619: I/Unity(24253):   at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
11-03 09:27:36.619: I/Unity(24253):   at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown>:0
11-03 09:27:36.619: I/Unity(24253):   at UnityEngine.AndroidJavaObject._CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
11-03 09:27:36.619: I/Unity(24253):   at UnityEngine.AndroidJavaObject.CallStatic[AndroidJavaObject] (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
11-03 09:27:36.619: I/Unity(24253):   at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x00000] in <filename unknown>:0
11-03 09:27:36.619: I/Unity(24253):   at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) [0x00000] in <filename unknown>:0
11-03 09:27:36.619: I/Unity(24253):   at UnityEngine.AndroidJavaObject..ctor (System.String className, System.Object[] args) [0x00000] in <filename unknown>:0
11-03 09:27:36.619: I/Unity(24253):   at System.Reflection.MonoCMethod.Invoke (
mgrilec
 
Posts: 5
Joined: November 1st, 2015, 10:05 pm

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby Guillaume » November 3rd, 2015, 2:10 pm

It seem that your PlayerIO Java class were not included in your build. Are you sure the PlayerIO Library is present in the Plugins/Android folder of your Unity Project ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby mgrilec » November 3rd, 2015, 5:07 pm

It's in Assets/Plugins/Android, as well as the Temp/StagingArea/aar when it's building. I'm using a Samsung S3 to test. Can you confirm the latest SDK is working on your Android?
mgrilec
 
Posts: 5
Joined: November 1st, 2015, 10:05 pm

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby Guillaume » November 3rd, 2015, 5:43 pm

Yes its working.

What is your Unity version ? Mine is 4.6.8p4
If you are on Unity 5.x, are you using Mono or IL2CCP as scripting backend on Android ? I'm still using Mono, as this is the only option on Unity 4.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby mgrilec » November 3rd, 2015, 5:52 pm

I'm on Unity 5.2.2f1, using Mono. I worked around this by creating a facebook connection and connecting via FacebookOAuthConnect. I just imported the unitypackage in the SDK and copied over the Android library. I also have a link.xml file for calculating the AuthHash, but that shouldn't matter. Did you do anything different?
mgrilec
 
Posts: 5
Joined: November 1st, 2015, 10:05 pm

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby Guillaume » November 3rd, 2015, 7:44 pm

Humm maybe your PlayerIO library has been stripped somewhere ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby mgrilec » November 3rd, 2015, 10:05 pm

Thanks for the hint, I'll look into it.
mgrilec
 
Posts: 5
Joined: November 1st, 2015, 10:05 pm

Re: ClassNotFoundException: com.playerio.PlayCodeStorage

Postby clzola » March 20th, 2017, 3:42 pm

Hi everyone, I have the same problem and I have no idea what is happening. When I try to authenticate i get exception that com.playerio.PlayCodeStorage class is not found. I have UnityAndroidExtension.jar in Plugins folder...
clzola
 
Posts: 6
Joined: January 7th, 2013, 2:36 pm


Return to Mobile