Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Creating Android App Bundles (aab) with Unity Cloud Builds

Discussion in 'Unity Cloud Build' started by Nieles_GH, Dec 19, 2018.

  1. HaakonL

    HaakonL

    Joined:
    Mar 13, 2014
    Posts:
    113
    It only works half way - the aab is indeed created, but no matter what I do it only contains one architecture. I've tried setting all 3 architectures in the build settings, and also try to force set them through a pre-export step in CB.

    We are currently shut out from updating our live game until this is fixed.
     
  2. jason-vreps

    jason-vreps

    Joined:
    Sep 22, 2017
    Posts:
    6
    First off, I'd like to commend the Cloud build team for so many swift improvements in this realm. As Google's mandated 64-bit deadline approaches, seeing these quick reactions are very important and appreciated.

    At this point, I've been successfully building .AABs through Cloud Build and been uploading them to the Play store. However, I now find myself in the same position as @HaakonL. After the AAB is unpacked by the play store, it only recognizes 2 APKs. In my situation, it was able to find the x86 and armeabi-v7a (ARMv7) versions, but not the ARM64 version.

    From the Google Play Console, I navigated to "Release Management > Artifact Library" and under "Active Artifacts", I found my recently released version code. Then I pressed the "EXPLORE" link on the right side, and was presented with this screen:



    Indicating that only 2 APKs were found.

    Edit: SOLVED
    I went back into my player settings for Android and noticed that ARM64 was not selected. The option was greyed out, so to get it to enable, I switched Scripting Backend from Mono to IL2CPP, enabling the ARM64 option. Once this was selected, and the changes were pushed to our repo, the next AAB build included 3 native builds, and the Artifact Library confirmed that the included builds are arm64-v8a, armeabi-v7a, and x86.

    My mistake! I had thought that an AAB would package all 3 builds automatically. Sorry for any alarm!
     
    Last edited: Jul 3, 2019
  3. Eric-Farraro

    Eric-Farraro

    Joined:
    Apr 23, 2013
    Posts:
    20
    Perhaps I misunderstood @victorw , but I didn't see the option to build .aab in Unity Cloud build. This is what I see in Advanced Options - should I be looking somewhere else?


    upload_2019-8-6_11-4-27.png
     
  4. victorw

    victorw

    Unity Technologies

    Joined:
    Sep 14, 2016
    Posts:
    127
    @Eric-Farraro the build target needs to be configured to build against Android with a version of Unity which supports Android App Bundle builds (2018.3+ or 2017 LTS versions greater than .4.17)
     
  5. Eric-Farraro

    Eric-Farraro

    Joined:
    Apr 23, 2013
    Posts:
    20
    @victorw Can confirm - I was running 2018.1 and updating to 2018.3 resolved my issue. Thanks for the quick response, you're a lifesaver!

    Shoutout to @jason-vreps as well - thanks for taking the time to update your post to include your solution on Google rejected the .aab due to lack of 64-bit support. I later ran into the same issue and your response was critical to helping me solve it.
     
    Last edited: Aug 7, 2019