How to create android .APK file for two architectures?

Hi.

I’m troubling with building .apk for some architectures.

The problem is that when I support two ABI, which are x86 and armeabi-v7a, the output will be two .apks.

One is for armeabi-v7a and the other is for x86. So, I need to integrate them into one .apk file.

These are what I did.

  1. Edit UnrealEngine/Engine/Build/Android/Java/jni/Application.mk file to support both ABI like this.
    APP_ABI := “armeabi-v7a x86”
    APP_PLATFORM := android-9

  2. Set both flags bBuildForX86 and bBuildForArmV7 to “True” from myProject/Config/DefaultEngine.ini
    bBuildForArmV7=True
    bBuildForX86=True

  3. Begin build and there will be two .apk files for each architecture.

Anyone know how to integrate them into one .apk file?

I really need any help or link.

Thanks in advance.

Creating an APK with multiple architectures in the same file isn’t supported. If you turn on arm7 and x86 in the Android project settings it will create two APKs; one for each architecture. The store will filter based on the architecture of the device and download the correct one. It was decided that the resulting APK would be too big at the time (would have exceeded the 50 MB limit just for code without the game data) so wasn’t worth doing.

If you really need to do this, there is a way to do it manually. If you package first for armv7, then go into the project’s Intermediate/Android/APK/libs and make a copy of armeabi-v7a contents, then package for x86. Copy the armeabi-v7a back, then from command line in Intermediate/Android/APK run “ant debug” or “ant release” it should repackage the APK with both. The ant.properties from previous package should still have the code signing information for release.

Bump this thread.

It is 2020 now, and Google Play limits are 150mb now, so it is possible to upload two architectures in single APK…

But does unreal support it? Is it planned in future??

rebump this.

I am struggling with only being able to publish a arm64 file to the Google Play Store and not the armv7. Losing alot of devices including my own lol. I cant download my own game because its not compatible; the same phone I tested on.

I’m stuck. Gonna try a new UE version and see if it’s an option to bundle now. See some other threads mentioning it.

Guys hey have you found a solution? I just uploaded a game using etc2, and can play it only with a few phones… by using the multi packaging in a closed testing i still can play it with latest generation phones…