i built an ar game in UE 5 but when i build it it keeps crashing at splash screen. from articles it stays that its an issue with UE5 and android. do you have any suggestions?
can you share the log file , we dont know what is the crash error
also check this Packaging Android Projects in Unreal Engine | Unreal Engine 5.0 Documentation
what log are you referring to?
Hey @stargate410911,
There is a crash log in your files that Unreal generates.
i think i have found the log you are referring to. but it wont let me send it. is there a line that i should be looking for in it?
depends on the age of your phone
if its newer
you have to use arm 64 v7 with sdk 30+
if its older it should be 29 or 30
have it all set like that and it is an newer phone.
its possible you might need sdk 31 if ts really new
build
get the error
and screen shot the red lines
i do have it set to 31 now. and when i have unreal build it and launch it on the phone it dose not give a red error in unreal. it says successful. it just crashes right away on the phone.
Hey @stargate410911,
It could possibly be a memory leak causing the crash. Debugging for Android devices in Unreal Engine | Unreal Engine 5.0 Documentation
When you debug, try checking out the Logcat to see what happens.
I hope this helps!
-Zen
don’t launch it on the phone from unreal
make an apk and install it on the phone manually from the phone.
which i have also done and its the same issue.
this is what the logcat says when it crashes:
2022-08-30 09:57:24.391 13407-13426/com.xxxxxxx.xxxxxxxpoc E/AndroidRuntime: FATAL EXCEPTION: pool-4-thread-1
Process: com.xxxxxxx.xxxxxxxpoc, PID: 13407
java.lang.IllegalArgumentException: com.xxxxxxx.xxxxxxxpoc: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:196)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:128)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:93)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
Hey @stargate410911,
I’m not entirely sure how Unreal handles it, but Android 12 API 31 requires that specified pending intent, but I would assume this is just an error that occurred when you updated to the newest version. I found an answer on StackOverflow that might answer your problem. java - MediaSessionCompat:Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent - Stack Overflow.
I hope this can help!
-Zen
i fixed the issue. so i made a new project and move everything over there. and now i have no issue. so it was something with the 5.0.0 build of UE5. the newer versions are fine.
hey can you explain exactly what you did ?
Im facing the same problem the apk opens shows splash screen and then gets crash
didnt work for me