Search Unity

150MB reached no solution

Discussion in 'Android' started by mahito2932, Feb 5, 2022.

  1. mahito2932

    mahito2932

    Joined:
    Nov 15, 2020
    Posts:
    115
    Hello guys!
    I'm having a very bad time. I can't find any solution. Since Google removed the ability to upload apk but only abb it is impossible for me to update my apk with new contents. I know about Assets Bundles but it requires the server to upload files.
    So can it be said is the end of development for me? :(
     
  2. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054
    Are you sure?
    I thought they removed it a long time ago, because of the poor PlayConsole UI. However up until a few weeks ago ( last time I made an update ) you could still update an existing app via apk as long as the app was initially created with apk before the change to aab.

    The trick is you can't simply drag and drop into the space in the console, instead you have to click on 'Upload' if memory serves me.

    Having checked the Google blog there is still NO requirement for existing apps to update to aab, though since Nov 2021 they do have to be built against API level 30.

    Now if you game has recently exceeded the 150 MB limit then you may well be forced to update to aab - its not something i've had experience with. If thats the case then you'll have to take the plunge, unless using say asset bundles can get around that issue?
     
  3. mahito2932

    mahito2932

    Joined:
    Nov 15, 2020
    Posts:
    115
    Thank you for replying.
    Actually I have already tried but it says that it no longer supports the apk format but only aab even if I drag it nothing happens. It forces you to load aab.

    Some time ago I uploaded an old game and I can still update in apk format and add obb files but with the new game I can't do anything anymore :(

    Actually assets bundles work only if you upload everything on server but you need to pay for that. If it happens one day that many users download the game at the same time, it is necessary to see if the broadband width is not exceeded.
    So asset bundles are not the solution
     
  4. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054

    Well thats worrying to hear as I dread the thought of having to update client apps to aab.

    I wonder though if you've recently gone over the 150 mb limit though and thats why this update is failing? If that's true then how far over are you? Is there a possibility of reducing the build size? Maybe even make a test build where you force all textures to be downsampled to some small dimension just to see if you can submit it as I outlined above?

    If that works then you can look into reducing the build size. By default i've found a good few MB or greater gets added to a build that is often not required, shaders, textures, unused scripts, unused text assets etc. I'm sure there must be some decent threads on reducing build size here, though i'd start by grabbing the Build Report Inspector package and carefully looking at the results.
     
  5. ScottyB

    ScottyB

    Joined:
    Apr 4, 2011
    Posts:
    146
    If you are on a up-to-date version of Unity 2019.4.x, 2020.3.x, or 2021.2.x, then you can enable the Android Project Setting "Split Application Binary", and then build an AAB by enabling it in the build window. If you do that, then Unity will automatically make use of Google Play's new Play Asset Delivery feature which gets your around the 150 MB limit.

    If your game is less than 1GB in size then everything will most likely just work auto-magically without any extra work from you. If it is greater than 1GB then you need to write some extra code to make sure every thing is downloaded properly when the game is first launched.
     
    Last edited: Feb 6, 2022
    Noisecrime likes this.
  6. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,054
    Thats useful to know, but isn't the main problem with switching to aab delivery that you have to opt-in to the 'signed by Google Play' system? Which from what I remember reading is rather complex to set up for a pre-existing app made with Unity, especially depending on which version of Unity created the original signing key. Its not impossible to do, but last I checked through the forums there were very long threads on how to do it properly.
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    Not really.
     
  8. mahito2932

    mahito2932

    Joined:
    Nov 15, 2020
    Posts:
    115
    Hi ScottyB. My apk should be around 545MB but I've made optimizations and removed a lot of useless files and now my apk is about 170MB but that's not enough and beyond that I can't do anything else. I did what you listed but my abb always remains on 170 mb despite having split enabled with or without it gives me the exact same result. I also tried changing the Unity version but it didn't give any other results.
     
  9. mahito2932

    mahito2932

    Joined:
    Nov 15, 2020
    Posts:
    115
    Hi.
    I have already done the best I could my apk should be 500mb but I managed to reach 170mb but I still exceed the limit

    But even if you ever go over 500MB it will never be a solution to shrink your build every time. For example Genshin Impact is about 16GB but I think they have everything on the servers otherwise it's not explainable

    besides I have also deleted the cache and the library folder and all the rest of the useless contents but I remain on 170MB anyway
     
    Last edited: Feb 6, 2022
  10. ScottyB

    ScottyB

    Joined:
    Apr 4, 2011
    Posts:
    146
    Sorry, I wasn't completely clear in my first post.

    Yes, your AAB will still be bigger than 150MB after enabling "Split Application Binary" and that is by design. Unlike with the previous APK+OBB method where 2 files were produced, an AAB has everything "bundled" into 1 file. Internally it is split into multiple parts that get downloaded by player's separately, but you only need to upload 1 file.

    So if you've built with "Split Application Binary" then you can upload an AAB file that is bigger than 150MB and Google Play should allow it.
     
    Last edited: Feb 7, 2022
    Noisecrime and mahito2932 like this.
  11. mahito2932

    mahito2932

    Joined:
    Nov 15, 2020
    Posts:
    115
    Thank you very much that worked! :)
    I didn't know about that