Search Unity

APK / OBB file size limit

Discussion in 'Android' started by paulatwarp, Sep 10, 2019.

  1. paulatwarp

    paulatwarp

    Joined:
    May 17, 2018
    Posts:
    135
    Is there a limit to the APK file size?

    I'm building with Unity 2018.2.20f1. My APK will build with Gradle but only if I export the project and run gradle from the command line with 32GB heap space. It produces an APK of about 3GB which loads but doesn't run on my device (Oculus Quest).

    If I choose to split the APK then the aapt.exe package tool fails during the build. It doesn't say that it's out of memory, but it does seem to be around the 2GB mark at the point of failure.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Yes, both apk and oob are limited in size. I think it's 2GB for obb, way less for apk (finding 100MB on stackoverflow).
    You should be looking into dynamic content delivery for your app.
     
    paulatwarp likes this.
  3. paulatwarp

    paulatwarp

    Joined:
    May 17, 2018
    Posts:
    135
    Thanks.
     
  4. tropezon

    tropezon

    Joined:
    Aug 8, 2017
    Posts:
    4
    Oculus store have a limitation of 4gb on obb. It's posible to remove 2gb limitation on unity obb build?