Announcement

Collapse
No announcement yet.

[Tutorial] How to create Android App Bundle at Unreal Engine?

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

    [Tutorial] How to create Android App Bundle at Unreal Engine?

    Dear Community,

    I saw lots of people suffering from how to create AAB in unreal engine. There is not enough supply in internet or they are seperated, since I'm including my solution here.

    1- Choose armeabi-v7a from project settings.
    2- Build your project with etc1a or whatever you want to support. (tick 2.0 opengl for wider device support)
    3- Go under Project/Intermediate/Android/APK/Gradle/app/
    src/main/jniLibs
    4- Copy armeabi-v7a folder out of somewhere. Take backup(copy) of it.

    Click image for larger version  Name:	singlelib.png Views:	5 Size:	8.2 KB ID:	1725365

    5- Choose arm64-v8a from project settings.
    6- Build your project with etc1a or whatever you want to support. (tick 2.0 opengl for wider device support)
    7- Copy your armeabi-v7a folder to Project/Intermediate/Android/APK/Gradle/app/
    src/main/jniLibs. Keep in mind you will have there both armeabi-v7a and arm64-v8a folders.

    Click image for larger version  Name:	bothlib.png Views:	4 Size:	6.3 KB ID:	1725366

    8- Install Android Studio
    9- Open project, choose gradle under your project Project/Intermediate/Android/APK/Gradle
    10- Let it process. Wait for build. (you can update but you dont have to update gradle from notification)
    11- Go to build.gradle for your app (it may be app-app or gradle-app configuration) and add android section as below (add from split)



    android{
    splits {
    abi {
    enable true
    reset()
    include "armeabi-v7a", "arm64-v8a"
    universalApk true
    }
    }






    //SOMETHING SOMETHING WRITES HERE
    }


    ‚Äč
    Click image for larger version  Name:	splits.png Views:	5 Size:	73.3 KB ID:	1725367

    12- Put ndk to your other gradle. (You will see all gradles in the left tree view of android studio.). Go buildAdditions.gradle and put below:
    ndk {
    abiFilters "arm64-v8a", "armeabi-v7a"


    }

    Click image for larger version  Name:	ndk.png Views:	5 Size:	66.8 KB ID:	1725368


    13- Build your project in android studio to check if project throwing any error.
    14- Now Go to Build/Generate Signed Bundle/APK

    Click image for larger version  Name:	gensignedapk.png Views:	4 Size:	15.7 KB ID:	1725369

    15- Search for your key you created in ue4 for app. Also fill in your password info
    16- Choose export location if you don't the file should be located Project/Intermediate/Android/APK/Gradle/App/Release

    Now you are good to go. Upload your application and have wide solution. I hope this helps.


    References :

    https://developer.android.com/studio...ure-apk-splits
    https://developer.android.com/studio...-native-builds

    https://www.youtube.com/watch?v=lmjhoqnbbvc&feature=youtu.be
    Attached Files
    Last edited by RedrainKuka; 02-25-2020, 03:15 AM.

    #2
    Thanks for this. Great post.

    Comment


      #3
      How can i add obb file to AAB, i couldn't find the option that allow me to add obb file to AAB in Google Play Console, or do i have to package my enitre game within a single AAB file?

      Comment


        #4
        MrKentaky you need to make entire game into single AAB file.
        Working mechanism is like this :
        • With in a single aab, you include packages with armeabi-v7a and arm64-v8a.
        • When people download your game from google play, google play matches with the CPU type of your aab file and help user to download right version of game.
        I hope its clear

        Comment


          #5
          Thanks, it helped a lot, I spent 10 days looking for a solution, and I managed to solve it with this post.

          Comment


            #6
            Thank you for this post, it is very useful for me!

            Comment


              #7
              Originally posted by MrKentaky View Post
              How can i add obb file to AAB, i couldn't find the option that allow me to add obb file to AAB in Google Play Console, or do i have to package my enitre game within a single AAB file?
              App Bundles do not currently support the use of Android expansion files (.OBBs).

              https://docs.unrealengine.com/en-US/..._25/index.html

              Comment

              Working...
              X