Android Crash (UE4.27) cannot locate symbol "android_get_device_api_level"

Hi There. Anyone had this issue? When running the package dev build on my phone, I am getting this crash: (it happend with source and stock UE4.27

02-04 01:01:17.309 11529 11529 E AndroidRuntime: FATAL EXCEPTION: main
02-04 01:01:17.309 11529 11529 E AndroidRuntime: Process: com.YourCompany.NuevoSource427, PID: 11529
02-04 01:01:17.309 11529 11529 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “android_get_device_api_level” referenced by “/data/app/com.YourCompany.NuevoSource427-4MMpsfo87vQetB_IkOHQxQ==/lib/arm64/libUE4.so”…
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1669)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at com.epicgames.ue4.GameActivity.(GameActivity.java:6655)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:43)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1215)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3008)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7050)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
02-04 01:01:17.309 11529 11529 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

This is happening with just the first person basic template. I’ve just reinstalled Android Studio a couple of times, reinstalled java, but I always had this problem.

I was able to make builds in 4.26.

I truly appreciate any help with this.

Thanks!

can we criticize Epic’s lack of support for mobile systems?

I used the engine from 4.25 to the current version 4.27.2) never had problems with packaging and use) in the latest version of the engine they updated your libraries to android x … you can update the play-services to the latest versions without any problems) what will you criticize for? I will support you) :smiley:
P.S i pack and install my phone(android 7.1) arm64 “first person” … there are no problems // ue4.27.2 from github

Well, it does not work for me with 4.27 after the reinstallation of everything again. So my advice is to avoid reinstall UE4 or any android component if possible if you come from previous version. The last couple of years I was updating and everything worked fine, until I had to reinstall 4.27.

So now, I’ve reinstalled a couple of times, still the same issue. Cannot locate symbol “Android_Det_Device_Api” when I am starting the app in my phone as dev. But it works as ship build! So anyone have any clue about what it might be? Thanks!

the problem is exactly on your part, because I have everything working fine…try my settings … maybe it will help Pack a game for android without installing android studio (+update android 12)

no offense, but telling someone: “but it works to me” it does not contribute too much to solving the issue.

For example, What does mean this error? What might cause it? Why only happen on developer builds?

AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “android_get_device_api_level”

I meant that in the engine 4.27.2 from github… “first person” arm64, development or shiping, works for me … that is, the problem is on your part and not in the engine … because sometimes there are bad versions of the engine where something is broken//for example this a little broken in the last version of the engine
Screenshot_1
//
try my settings … they are guaranteed to work with the latest engine version…
//
if it still won’t work then there was an error when building the engine

Of course) I was just trying to convey that the error is local and not global in the engine…if you configure java sdk ndk as I have but still there will be an error … then definitely an error in the engine and then it makes sense to rebuild it
P.S we exclude the moment that you have somewhere blocking the firewall of something :smiley: sometimes it is the cause of error

Funny enough my QA team just started getting this crash this morning. Build from last night is fine, but we are now getting the exact same crash call stack as of this morning. No relevant changes on our end between the two builds (updated some data files). Still trying to track down if some dependency got updated overnight but for us the crash is only happening on Android 9 devices. Android 10 and Android 11 don’t crash.

Looks like it might be something directly related to S8 devices as our S8+ devices (also on Android 9) can load the game still fine as well.

You know what? I also have a S8+ so it might be something there…

Figured out the issue on our end. Turns out one of our build nodes got out of sync some how (rectifying that going forward). But the root cause seems to have been builds built with build-tools 29.0.2 rather than build-tools 30.0.2. Once I updated the broken node to 30.0.2 as well our QA team was able to load the builds on old devices again.

Hopefully that helps you out!

Interesting, thank you @anonymous_user_484b3450 I will look at it.