Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

64 Bit Local APK is Ok - Google App Bundle Download Crashes

Discussion in 'Android' started by AshleyBates, Jul 1, 2019.

  1. AshleyBates

    AshleyBates

    Joined:
    Feb 24, 2017
    Posts:
    34
    Hi,

    I am currently in the process of converting my application to support 64bit. I am at the point now where if I compile a local APK and put it onto my device (manually), I can install, run the app and get no problems.

    I have now built a google app bundle and uploaded to the store and began to test. This works fine on the 32bit version, but on a 64bit tablet I get a complete crash and the following crash report -

    Code (JavaScript):
    1. java.lang.Error: FATAL EXCEPTION [UnityChoreographer]
    2. Unity version     : 2019.1.8f1
    3. Device model      : samsung SM-T835
    4. Device fingerprint: samsung/gts4lltexx/gts4llte:9/PPR1.180610.011/T835XXU2BSD1:user/release-keys
    5.  
    6. Caused by
    7.   at android.view.Choreographer.postFrameCallbackDelayed (Choreographer.java:511)
    8.   at android.view.Choreographer.postFrameCallback (Choreographer.java:494)
    9.   at bitter.jnibridge.JNIBridge.invoke (JNIBridge.java)
    10.   at bitter.jnibridge.JNIBridge$a.invoke (JNIBridge.java:20)
    11.   at java.lang.reflect.Proxy.invoke (Proxy.java:1006)
    12.   at $Proxy8.doFrame ($Proxy8.java)
    13.   at android.view.Choreographer$CallbackRecord.run (Choreographer.java:947)
    14.   at android.view.Choreographer.doCallbacks (Choreographer.java:761)
    15.   at android.view.Choreographer.doFrame (Choreographer.java:693)
    16.   at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:935)
    17.   at android.os.Handler.handleCallback (Handler.java:873)
    18.   at android.os.Handler.dispatchMessage (Handler.java:99)
    19.   at android.os.Looper.loop (Looper.java:214)
    20.   at android.os.HandlerThread.run (HandlerThread.java:65)
    Anyone have any ideas why / what this may be?

    Thank You.
     
  2. AshleyBates

    AshleyBates

    Joined:
    Feb 24, 2017
    Posts:
    34
    I have just done some more testing with this including looking at logcat.

    If I do a development build, I get no errors and everything in the application works as expected.

    If I do exactly the same build without the development build turned on, I get errors relating to both an asset I am using and relating to a sqlite database .so file (unable to be found) as seen below. Again if I build as development, everything works as expected. Surely someone has an idea as to why?

    I would assume it is because a file isn't being included when not in development mode, but I don't see how this is the case?

    I am using Unity version 2019.1.8f1

    Code (CSharp):
    1. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "net.sqlcipher.database.SQLiteDatabase" on path: DexPathList[[zip file "/data/app/maccs2tablet.kprmidlink.com-MlU3cv3YNRfqhoqlEU6yVQ==/base.apk"],nativeLibraryDirectories=[/data/app/maccs2tablet.kprmidlink.com-MlU3cv3YNRfqhoqlEU6yVQ==/lib/arm64, /data/app/maccs2tablet.kprmidlink.com-MlU3cv3YNRfqhoqlEU6yVQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
    2. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
    3. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
    4. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
    5. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:-2)
    6. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at void java.lang.Runtime.load0(java.lang.Class, java.lang.String) (Runtime.java:926)
    7. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at void java.lang.System.load(java.lang.String) (System.java:1633)
    8. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at boolean com.unity3d.player.UnityPlayer.nativeRender() (:-2)
    9. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at boolean com.unity3d.player.UnityPlayer.c(com.unity3d.player.UnityPlayer) (:-1)
    10. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at boolean com.unity3d.player.UnityPlayer$e$1.handleMessage(android.os.Message) (:-1)
    11. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
    12. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at void android.os.Looper.loop() (Looper.java:214)
    13. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]   at void com.unity3d.player.UnityPlayer$e.run() (:-1)
    14. 2019/07/02 14:29:32.391 27014 27032 Fatal .kprmidlink.co thread.cc:2155]
    15. 2019/07/02 14:29:32.397 27014 27112 Warn .kprmidlink.co Runtime aborting -- recursively, so ignore AddGlobalRef
    16. 0001/01/01 00:00:00.000 -1 -1 Info  --------- beginning of crash
    17. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime FATAL EXCEPTION: UnityChoreographer
    18. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime Process: maccs2tablet.kprmidlink.com, PID: 27014
    19. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime java.lang.IllegalArgumentException: callback must not be null
    20. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.view.Choreographer.postFrameCallbackDelayed(Choreographer.java:511)
    21. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.view.Choreographer.postFrameCallback(Choreographer.java:494)
    22. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at bitter.jnibridge.JNIBridge.invoke(Native Method)
    23. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at bitter.jnibridge.JNIBridge$a.invoke(Unknown Source:20)
    24. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
    25. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at $Proxy8.doFrame(Unknown Source)
    26. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
    27. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.view.Choreographer.doCallbacks(Choreographer.java:761)
    28. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.view.Choreographer.doFrame(Choreographer.java:693)
    29. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
    30. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.os.Handler.handleCallback(Handler.java:873)
    31. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.os.Handler.dispatchMessage(Handler.java:99)
    32. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.os.Looper.loop(Looper.java:214)
    33. 2019/07/02 14:29:32.397 27014 27112 Error AndroidRuntime at android.os.HandlerThread.run(HandlerThread.java:65)
    34. 2019/07/02 14:29:32.397 27014 27112 Warn .kprmidlink.co Runtime aborting -- recursively, so ignore AddGlobalRef
    35. 2019/07/02 14:29:32.444 27014 27112 Info Process Sending signal. PID: 27014 SIG: 9
    36.  
    Thank You.
     
  3. AshleyBates

    AshleyBates

    Joined:
    Feb 24, 2017
    Posts:
    34
    Ok, more clues (maybe).

    I wondered if it was a permission problem, so I installed a plugin from the Asset store just to try and set permissions using that easily - however when I build using that I get the following class not found error. Yet once again when I build using a development build, everything works as it should.

    I feel as though every android plugin within my project doesn't get build / the class files can't be found when the project is built normally. I am at a loss with this currently!

    Code (CSharp):
    1. 2019/07/03 10:33:57.536 6620 6638 Error Unity AndroidJavaException: java.lang.ClassNotFoundException: com.yasirkula.unity.RuntimePermissions
    2. 2019/07/03 10:33:57.536 6620 6638 Error Unity java.lang.ClassNotFoundException: com.yasirkula.unity.RuntimePermissions
    3. 2019/07/03 10:33:57.536 6620 6638 Error Unity at java.lang.Class.classForName(Native Method)
    4. 2019/07/03 10:33:57.536 6620 6638 Error Unity at java.lang.Class.forName(Class.java:453)
    5. 2019/07/03 10:33:57.536 6620 6638 Error Unity at java.lang.Class.forName(Class.java:378)
    6. 2019/07/03 10:33:57.536 6620 6638 Error Unity at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    7. 2019/07/03 10:33:57.536 6620 6638 Error Unity at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    8. 2019/07/03 10:33:57.536 6620 6638 Error Unity at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:78)
    9. 2019/07/03 10:33:57.536 6620 6638 Error Unity at android.os.Handler.dispatchMessage(Handler.java:102)
    10. 2019/07/03 10:33:57.536 6620 6638 Error Unity at android.os.Looper.loop(Looper.java:214)
    11. 2019/07/03 10:33:57.536 6620 6638 Error Unity at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    12. 2019/07/03 10:33:57.536 6620 6638 Error Unity Caused by: java.lang.ClassNotFoundException: Didn't find class "com.yasirkula.unity.RuntimePermissions" on path: DexPathList[[zip file "/data/app/maccs2tablet.kprmidlink.com-rJuEIiBurfRY4bbGGeowkA==/base.apk"],nativeLibraryDirectories=[/data/app/maccs2tablet.kprmidlink.com-rJuEIiBurfRY4bbGGeowkA==/lib/arm64, /data/app/maccs2tablet.kprmidlink.com-rJuEIiBurfRY4bbGGeow
    13.  
     
  4. AshleyBates

    AshleyBates

    Joined:
    Feb 24, 2017
    Posts:
    34
    Some success - I found out it is to do with the minify settings

    upload_2019-7-3_12-9-41.png

    If I have my release set to use Proguard or Gradle, I get the above errors after installing the app.

    Can someone please explain to me what Proguard is and why it might be causing me a problem?

    Thank You.
     
  5. habitoti

    habitoti

    Joined:
    Feb 28, 2013
    Posts:
    141
    I am seeing the exact same issue now on my latest release (with Unity 2019.2.16f1). Minification is switched off.
    Did you solve it somehow?
     
  6. AshleyBates

    AshleyBates

    Joined:
    Feb 24, 2017
    Posts:
    34
    No, I am afraid not, I currently have minification switched off and the application works ok. The application I am using is a privately distributed app so it isn't a big problem for us - but I would still like to know what causes this / a proper fix.