• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums

Unity SDK: Android build crash with Minify option enabled

Scheduled Pinned Locked Moved Client API Defects
unityminifyandroid
2 Posts 1 Posters 376 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alessio Falsetti
    wrote on last edited by
    #1

    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.Ob
    

    Unity version: 2020.3.30f1
    BrainCloud Client 4.10.1

    Any suggestions? Thanks and please let me know.

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    Alessio Falsetti
    replied to Alessio Falsetti on last edited by
    #2

    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.

    1 Reply Last reply
    0

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users