Android Build Issue

I’m currently trying to get a build of one of the sample scenes running on an android device. The build works fine (on the desktop side) when the Android NDK & SDK are set to latest or setting NDK to 24. But, if any other versions are selected the build fails for various reasons (usually linker errors). The other issue is, that unless the NDK is set to 24/latest, it’ll always revert to 19, despite me having plenty of other versions available.

So the position I’m in is that the only successful build I can get, doesn’t work:

FATAL EXCEPTION: main
Process: com.YourCompany.MyProject, PID: 16382
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “__aeabi_memmove” referenced by “/data/app/com.YourCompany.MyProject-1/lib/arm/libUE4.so”…
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at com.epicgames.ue4.GameActivity.(GameActivity.java:2385)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.access$900(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:764)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)

I’ll post more logs if needed. Thanks ahead of time for any suggestions

Newer Android phones should support older apps. What’s wrong with sticking with 19? From what I can tell, there is limited UE4 support of Android versions. This link says it needs 19 or 21. Android Development Basics for Unreal Engine | Unreal Engine 5.1 Documentation

Sorry I probably didn’t convey it clearly. I have no preference for any version, the problem is that 24 is the only one that doesn’t give me any errors. (But my phone can’t run it)

I’m getting the “wchar.h” not found error, with all other versions

Are you using the AndroidWorks package? You have to sign up with Nvidia to get it.

Yep. I installed it through the script that comes with Unreal. I installed the latest versions, and all the different api levels. i’m sure I missed something somewhere, Im just not sure what it could be :confused:

Well then. If the linker isn’t finding memmove then something is severely wrong, like it’s including the headers/libs for one Android version but trying to load the DLL of another. I wish I could be more help.

Let’s go back. Try building for 19 and give us that error log.

Hmm… Maybe something went wrong with the install or some of my directories at some point. I might need to clean up my install later. Thankyou for the assistance anyways!

Okay. I’m not at my actual computer atm, but I’ll build it again right when I get back! (Like 15 mins. Sry!)

link text

Okay sorry about the wait! This is ndk on 19 with android set to default in the launcher.

That looks like there are include paths which are wrong/undefined. There may be missing environment variables. These expected headers are standard so the problem is very basic at this point.

This is confusing then, because I just tested it, and I can easily build a quick C program using wchar.h, yet Unreal can’t find it? :S

So update: I at long last have it working. What I did was set the NDK & SDK back to latest, and then disabled the arm7 build and replaced it with the arm64 build.

Blind assumption, but perhaps the previous versions didnt work is because I have my programming environment completely setup for 64bit development, and Unreal was looking for the 32bit versions of everything for that build?

Yay!!! I have no idea why this was so painful but I can tell you that there are many other problems with equally painful solutions, hehe.

Yeah I’m definitely looking forward to them, haha.
I honestly don’t know why I can’t do arm7 builds; but I rather not go down that wild road right now. Having any build is good enough :stuck_out_tongue:

Anyways thankyou very much for all your help :]