Announcement

Collapse
No announcement yet.

How to create android .APK file for two architectures?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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.

    Comment


      #3
      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??
      [My FREE stuff] Custom Cameras (Stategy, Orbital) | Sticker Note | ESC Inventory System | Pipe Generation (Spline based) | Procedural spline-based Mesh generation | Homing missile
      [My Market stuff] Advanced Aim Component | Lock/lockpick Component | Blueprint-based Key Remapping System

      Comment

      Working...
      X