Having the same issue over here. I did literally every single thing you mentioned. Every step.
Even though all my Asset Bundles are under the 1GB limit (according to Google’s documentation about Download Size Limits), when I upload the AAB generated by Unity, it says that one of the AssetBundles is over 2048MB. WHAT??
I’m trying a bunch of different things. I’ll report back here if I figure anything out.
Meticulously went through all my sprites, sounds, textures, etc. and assigned them to different asset bundles (excluding scripts).
Went to Assets > Build Asset Bundles and created the asset bundles.
Made sure to configure the keystore correctly, as well as the Publishing Settings.
Opened the window under Google > Android App Bundle > Asset Delivery Settings
Checked/Enabled “Separate Base APK”.
Added the Folder where by Asset Bundles are (I tried this using the default Asset Bundles folder and a Streaming Assets folder, both located in the main Assets folder).
Set them all to “Install Time”.
Then went to Google > Build Android App Bundle and built the AAB. Final AAB is about 1.8GB. But that should be OK, because I would imagine the initial APK that is less than 150MB is somewhere in there. One would imagine, anyways.
Logged into the Google Play Store Console and tried uploading the AAB. It fails because it says that one of the APKs is greater than 150MB.
Because it fails, I decide to check things out:
Since it failed, I loaded the AAB into Android Studio to see what was going on.
I see that, yes, there are Asset Bundles, and they are all under the 1GB limit each.
But there is a mysterious folder called “Data” which contains 915MB of files, each file is only 15KB to 150KB. It’s just a bunch of really small files that add up to 915MB. Weird.
I tried different variations of the above. Checking and unchecking “Split Application Binary” in the Publishing Settings. I even tried the following:
I ignore the Android Plugin altogether.
I enable “Split Application Binary”.
Go to Build Settings, and disable/uncheck “Export project” and check/enable Build App Bundle (Google Play).
Then build the AAB.
Log in to the Google Play Store Console and attempt to unload the AAB.
Again, it will be rejected because it exceeds the limit.
Now, all that said, I’m looking at your simple response, I realize that I’m not creating a “Base Module” as indicated on the official Android documentation.
Is that what I’m doing wrong? If so, I have to admit**, I can’t make heads or tails of that documentation**. To be frank, it’s obtuse and appears to leave out vital information. It leaves questions open:
What namespaces should be on the base module script?
Is it simply an empty scene (0 in Build Settings) with one object with the base module script attached? No camera? No nothing?
Is Android Google Play Store really analyzing the AAB file to locate scene 0, check to see if it has that base module script, and then using that script to separate the less than 150MB APK and the asset bundles? It just doesn’t seem like something the Google Play Store would do, you know?
Unity’s documentation is really great. Typically namespaces and any pertinent code is displayed altogether, giving the developer a well-rounded idea of what a complete script looks like. However, Google’s base module tutorial is… honestly, awful. It lacks a complete example. That said – Are there any examples of a complete Base Module script, beginning to end?
Currently my game is out on Steam (PC & Mac), Nintendo Switch, and iOS. Porting to different platforms, I’ve NEVER ran into an issue that seemed so insurmountable until I’ve tried to publish on Android. Each attempt to upload an AAB takes at least 1.5 hours. This has drained me.
And yes, going to Build Settings > check Export project > Build, then pulling it into Android Studio, it runs on an Android device perfectly fine. No issues. Played through the entire thing.
Definitely a head-scratcher. Any reply would be appreciated. Thanks!
That’s correct if you’re using Unity’s PAD solution you shouldn’t need Google’s plugin. I would suggest to use bundletool - https://developer.android.com/studio/command-line/bundletool to extract produce aab and explore the contents of the base module.
Then… I guess… upload that to Google Play Store Console???
Is that correct?
There are huge gaps in the documentation and everything feels like it was written by computer scientists. It’s too bad Android can’t make things easier like Apple does with Xcode. That’s a breeze in comparison. With Android, everything is extremely tangental and there are a lot of important little steps that just seemed implied.
Then from Unity menu, pick App Bundles->Deconstruct AAB
Pick AAB you’ve built
Check apk files in extracted folder next to your aab, and look at base-master.apk, I assume this file will be bigger than 150MB, unzip with 7z and check what files are the biggest ones
all right, did as you say, end up with two folders witch the one called asset slices contains a big apk about the size of the aab file and the other called splits has 3 small apk’s
Hey, sorry I didn’t respond. We had to evacuate our area due the hurricane in Florida. Getting back home (no damage!). I did get an hour to try what you suggested… I’m on a Mac… and 7z. No idea what that is. So, I Googled it and downloaded it from here:
I downloaded the MacOS one. No idea how to use it.
I didn’t have a lot of time, so after I imported the scripts you sent, I tried this clicking “Build AAB and deconstruct” (see screenshot):
But that didn’t really work. I just got an AAB file and bunch of other files in the same folder. I’ll have to try this again once I get back home. I appreciate the response. Hopefully we can get this sorted.
Apologies for the late reply. It’s been a crazy week. OK. So, when I click “Build AAB and deconstruct”, I get the following files in an AppBundle folder located in my project folder:
Opening the “extracted” folder, I get the following apks:
Here are the sizes of those apks:
It’s important to note that Android no longer supports the uploading of an apk file. You have to upload an aab file now. The only aab file in that folder is the one that says “test”, which is 1.56 GM. So, you would think that this is the aab file that contains the split binary apk within it. However, when I upload this “test” aab file to the Play Store console I get this error:
This is super weird, because the aab is 100% signed. In fact, you can’t even click “Build AAB and deconstruct” without signing it, an error pops up reminding you to sign it. You can even see that it’s signed here in the Player Settings:
Any help with this would be greatly appreciated. I look forward to hearing back from you soon. Thanks!
Yes, I know. You don’t need to upload these apk, the point of deconstruction was to see what apk sizes are produced from aab. Because that’s what Google does on their side, when you upload the aab, and user is installing your game, Google is sending apk files created from your aab.
In any case base-master.apk is bigger than 150MB, that’s the issue, unzip this file, and check what’s taking so much space.
EDIT FROM ABOVE: Just to be clear, yes, my game does work. It’s currently available on Steam (Mac, PC), iOS, and Nintendo Switch. Uploading a well-built AAB to the Google Play Store Console Android is where I’m running into the problem. The AAB that Unity builds is always rejected.
Now, if I build the game in the Build Settings as an APK project, put it into Android Studio, plug in an Android phone, the game runs perfectly fine. So, it’s not a matter of if the games runs or not. Again, it’s just uploading an AAB that meets Google’s restrictions. Unity builds AABs and those are always rejected.
I looked at the contents of the base-master.apk is a online unzipper. Here are the contents:
Every file in the base-master.apk is under 1000 KB (under 1MB). Most are just a few KB. EXCEPT… there is one I found that is 133.71 MB. It’s in base-master.apk > assets > bin > Data. In this “Data” folder, the file is called “sharedassets0.resource”:
What do you guys think this file is exactly? That may be the culprit.