Unity SDK: Android build crash with Minify option enabled
-
Hi!
In Unity, if I compile my game with the Minify option enabled, BrainCloud produces the following error:: AndroidJavaException: java.lang.ClassNotFoundException: com.braincloud.unity.RegionLocaleNative : java.lang.ClassNotFoundException: com.braincloud.unity.RegionLocaleNative : at java.lang.Class.classForName(Native Method) : at java.lang.Class.forName(Class.java:454) : at com.unity3d.player.UnityPlayer.nativeRender(Native Method) : at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) : at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:83) : at android.os.Handler.dispatchMessage(Handler.java:102) : at android.os.Looper.loop(Looper.java:246) : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) : Caused by: java.lang.ClassNotFoundException: com.braincloud.unity.RegionLocaleNative : ... 8 more : at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0 : at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in <00000000000000000000000000000000>:0 : at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.ObUnity version: 2020.3.30f1
BrainCloud Client 4.10.1Any suggestions? Thanks and please let me know.
-
Hi!
In Unity, if I compile my game with the Minify option enabled, BrainCloud produces the following error:: AndroidJavaException: java.lang.ClassNotFoundException: com.braincloud.unity.RegionLocaleNative : java.lang.ClassNotFoundException: com.braincloud.unity.RegionLocaleNative : at java.lang.Class.classForName(Native Method) : at java.lang.Class.forName(Class.java:454) : at com.unity3d.player.UnityPlayer.nativeRender(Native Method) : at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) : at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:83) : at android.os.Handler.dispatchMessage(Handler.java:102) : at android.os.Looper.loop(Looper.java:246) : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) : Caused by: java.lang.ClassNotFoundException: com.braincloud.unity.RegionLocaleNative : ... 8 more : at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0 : at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in <00000000000000000000000000000000>:0 : at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.ObUnity version: 2020.3.30f1
BrainCloud Client 4.10.1Any suggestions? Thanks and please let me know.
Hi,
I temporarily solved it by adding this line in the proguard_user:-keep class com.braincloud.unity.* { *; }so the BrainCloud classes are no longer minified.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login