Android builds crash immediately after launching the app or game

I am building games for android. I noticed games crashing right after installing the apk and opening it in the emulator. It worked fine in physical device.

I had encountered similar issues in older Unity version when I saw ‘Unable to initialize unity graphics’ error. This time it crashes and closes the emulator and wipes all error log from android studio logcat.
I am using default URP project switched to android platform and V7 builds turned on and nothing else on the project.
With older Unity version, default URP project worked fine with emulators. But now its not working.

I tried turning on and off a few buttons on the Unity player settings but the problem persisted across different projects. Using Unity V 6.0.31f and …32f.
Please give me a solution.

Logcat :

Process: com.UnityTechnologies.com.unity.template.urpblank, PID: 11681
                                                                                                    java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~0Qe9RAX8bHBsw0SnUflNlQ==/com.UnityTechnologies.com.unity.template.urpblank-F_l4jPmltFbQhw9mKpuDJw==/lib/arm64/libc++_shared.so" program alignment (4096) cannot be smaller than system page size (16384)
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1110)
                                                                                                    	at java.lang.Runtime.loadLibrary0(Runtime.java:1032)
                                                                                                    	at java.lang.System.loadLibrary(System.java:1765)
                                                                                                    	at com.unity3d.player.UnityPlayerGameActivity.<clinit>(UnityPlayerGameActivity.java:30)
                                                                                                    	at java.lang.Class.newInstance(Native Method)
                                                                                                    	at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
                                                                                                    	at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
                                                                                                    	at android.app.Instrumentation.newActivity(Instrumentation.java:1453)
                                                                                                    	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4063)
                                                                                                    	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4357)
                                                                                                    	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:222)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:133)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:103)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2735)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:109)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232)
                                                                                                    	at android.os.Looper.loop(Looper.java:317)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:8875)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:891)

Looks like you’re using one of the system images with 16kb page size. Unity does not yet support 16kb page sizes, though support should arrive for 2021/2022 “early in the new year”.

You’ll have to use a regular image for testing and wait for Unity to add 16kb support to your version of Unity. For now, it looks like the only phones in the wild supporting 16kb pages are newer Pixel phones and there it’s only an opt-in developer option.

Hi. I have tried several emulator with several OS versions both 16Kb page size and not. Also tried targeting lower android versions. Most of the emulators removed/closed itself and removed all logs from logcat when game opens. So I can not copy crash log from other emulators.

it does not work on non 16kb page size emulators as well:

 A  vendor/unbundled_google/libs/ndk_translation/intrinsics/arm_to_x86_common/intrinsics.cc:96: CHECK failed: host_platform::kHasF16C
2024-12-27 21:15:02.787  3423-3457  libc                    com.Unity.AlienSeige                 A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 3457 (Job.Worker 0), pid 3423 (nity.AlienSeige)
2024-12-27 21:15:02.787  3423-3480  berberis                com.Unity.AlienSeige                 A  vendor/unbundled_google/libs/ndk_translation/intrinsics/arm_to_x86_common/intrinsics.cc:96: CHECK failed: host_platform::kHasF16C
2024-12-27 21:15:03.061  3492-3492  crash_dump64            pid-3492                             W  type=1400 audit(0.0:42): avc:  denied  { search } for  name="0" dev="tmpfs" ino=12 scontext=u:r:crash_dump:s0:c209,c256,c512,c768 tcontext=u:object_r:mnt_user_file:s0 tclass=dir permissive=0 app=com.Unity.AlienSeige
2024-12-27 21:15:03.061  3492-3492  crash_dump64            pid-3492                             W  type=1400 audit(0.0:43): avc:  denied  { search } for  name="0" dev="tmpfs" ino=12 scontext=u:r:crash_dump:s0:c209,c256,c512,c768 tcontext=u:object_r:mnt_user_file:s0 tclass=dir permissive=0 app=com.Unity.AlienSeige
2024-12-27 21:15:03.134  3492-3492  DEBUG                   pid-3492                             A  Cmdline: com.Unity.AlienSeige
2024-12-27 21:15:03.134  3492-3492  DEBUG                   pid-3492                             A  pid: 3423, tid: 3457, name: Job.Worker 0  >>> com.Unity.AlienSeige <<<
2024-12-27 21:15:03.146  3492-3492  DEBUG                   pid-3492                             A        #00 pc 00000000014f956c  /data/app/~~P_l_ZvmJ3hXo86Qjf8sPHw==/com.Unity.AlienSeige-uZTPdcmmqVmtLFd4PWGYJg==/lib/arm64/libunity.so (decompress_symbolic_block(astcenc_profile, block_size_descriptor const&, int, int, int, symbolic_compressed_block const&, image_block&)+1280) (BuildId: 1ab171906837fec1)
2024-12-27 21:15:03.146  3492-3492  DEBUG                   pid-3492                             A        #01 pc 00000000014f70b8  /data/app/~~P_l_ZvmJ3hXo86Qjf8sPHw==/com.Unity.AlienSeige-uZTPdcmmqVmtLFd4PWGYJg==/lib/arm64/libunity.so (astcenc_decompress_image(astcenc_context*, unsigned char const*, unsigned long, astcenc_image*, astcenc_swizzle const*, unsigned int)+504) (BuildId: 1ab171906837fec1)
2024-12-27 21:15:03.146  3492-3492  DEBUG                   pid-3492                             A        #02 pc 00000000006bf948  /data/app/~~P_l_ZvmJ3hXo86Qjf8sPHw==/com.Unity.AlienSeige-uZTPdcmmqVmtLFd4PWGYJg==/lib/arm64/libunity.so (BuildId: 1ab171906837fec1)
2024-12-27 21:15:03.146  3492-3492  DEBUG                   pid-3492                             A        #03 pc 00000000007d0a3c  /data/app/~~P_l_ZvmJ3hXo86Qjf8sPHw==/com.Unity.AlienSeige-uZTPdcmmqVmtLFd4PWGYJg==/lib/arm64/libunity.so (BuildId: 1ab171906837fec1)
2024-12-27 21:15:03.146  3492-3492  DEBUG                   pid-3492                             A        #04 pc 00000000007d1074  /data/app/~~P_l_ZvmJ3hXo86Qjf8sPHw==/com.Unity.AlienSeige-uZTPdcmmqVmtLFd4PWGYJg==/lib/arm64/libunity.so (BuildId: 1ab171906837fec1)
2024-12-27 21:15:03.146  3492-3492  DEBUG                   pid-3492                             A        #05 pc 00000000007d1908  /data/app/~~P_l_ZvmJ3hXo86Qjf8sPHw==/com.Unity.AlienSeige-uZTPdcmmqVmtLFd4PWGYJg==/lib/arm64/libunity.so (BuildId: 1ab171906837fec1)
2024-12-27 21:15:03.146  3492-3492  DEBUG                   pid-3492                             A        #06 pc 00000000008d3f5c  /data/app/~~P_l_ZvmJ3hXo86Qjf8sPHw==/com.Unity.AlienSeige-uZTPdcmmqVmtLFd4PWGYJg==/lib/arm64/libunity.so (Thread::RunThreadWrapper(void*)+1244) (BuildId: 1ab171906837fec1)
2024-12-27 21:15:03.179   620-3497  ActivityTaskManager     system_server                       

This is a different issue. Looks like it’s trying to convert ARM machine code to x86 and failing because a x86 extension (F16C) is not supported.

I don’t know too much about the Android emulator but you should probably do an x86 Android build in Unity (though, I’m not sure if current Unity allows you to do that) or use an ARM emulator to run your ARM build.

I also don’t know if the issue is with the emulator or with your computer, e.g. it seems that Snapdragon 8 Elite chips don’t support F16C.

No emulator from android studio I have tried is able to run Unity URP games.
I’m hoping for a solution from Unity team.