Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Brite
  • 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
  1. Home
  2. Client API Defects
  3. Unity SDK: Android build crash with Minify option enabled

Unity SDK: Android build crash with Minify option enabled

Scheduled Pinned Locked Moved Client API Defects
unityminifyandroid
2 Posts 1 Posters 1.2k 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 Alessio Falsetti

      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 Offline
      A Offline
      Alessio Falsetti
      wrote 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

      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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

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