Android builds won't run on API 19 or below. Always Crashes! API 24 Gives XAPK VALIDATION ERROR | 4.16.2
Since Unreal Engine 4.16 (and it's variants 4.16.1 / 4.16.2) came out, I updated all my projects from 4.15 to this new version and it only gave me problems!
I was expecting in this new engine version to get best android performance, among other things (since my focus is mobile/android development), instead, I had to unsupport all android devices from API 19 and below since every time I package my projects to this devices it always crashes no matter what I do. Every Project I Build for API 21 and up works with no problems, BUT, some problems return on API 24 (Nougat).
Since I began developing on Unreal Engine last year, I've been learning many things from this awesome engine. My very first Project was done on Unreal 4.10 and it worked great on API 14 and up devices. Since that time, I've been trying to better optimize that Project with the new UE4 versions that came out and right now we are at 4.16.2 and I have 4 developed games released to the store and with some more currently in development.
All my 4 projects currently released, before 4.16, they worked on all devices from API 14 and up. Now with 4.16 I tried a different packaging method - creating multiple APK in order to better optimize my games for all kinds of devices.
Steps I'm taking:
1 - Made an APK to support API 15 minimum and target 19 to use ETC1 textures. (NDK 19 and SDK = matchndk)
2 - Made an APK to support API 21 minimum and target 23 to use ETC2 textures and ES2 and ES3.1 (NDK 21 and SDK 23)
3 - Made an APK to support API 24 minimum and target 24 to use ETC2 textures, ES2 and ES3.1 and VULKAN (NDK = latest and SDK = latest)
4 - Uploading to Google Developer Console the 3 different APK at the same time and their respective OBB files.
PS: Only the APK 21/23 is working Correctly with no problems at all!
If Epic Games' STAFF tries to help me with this, please have a Nougat Device at hand, a Lollipop/Marshmallow Device at Hand AND a Kitkat/or below Device at hand. This way you can reproduce my problems.
The apps to test are the following (you can test the first one only as the errors are all the same for all apps):
Since I couldn't make API 19 or below to run, the current version from my apps are 21 and up so I'm attaching a test app so you can reproduce the Problem 1 with an API 19 Device
Below are screenshots for my API 19 builds:
I'm also attaching the logcat here: link text
I really hope you can help me with this. Thanks!
Yes, the issue with below Android 19 was due to dependency on runtime libc functions which are missing on older Android devices and has been fixed.
The settings you should use are NDK API level "android-19" and SDK API level "latest". There is no reason to change these; ARM64 will automatically use NDK android-21 if needed (you will see this in the log). The NDK external libraries are compiled with needs to match with the engine compile so it is not recommended to change these yourself unless you have a specific reason to do so. The SDK API level needed to be set lower before we fixed depreciated API calls in the download library code but it should be fine now.
Minimum SDK controls the required minimum level to install the APK. Target SDK controls the expected level of API support and fallback behavior. Setting this to 23 requires runtime permissions to be properly implemented; setting it lower does not require it. I'm not sure why 24 would break it unless there was another security change to accessing the OBB download location which is causing the verify to fail. If you need to force it to work only on 24 you could try setting minimum to 24 and target to 23 and see if that works; it should still be filtered out from installing on <24 but use the behavior of 23 for permissions/security.
answered Jul 05 '17 at 06:07 PM
Chris Babcock STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here