How to reproduce:
1. Open the “SimpleAPKObbBloat.zip“
2. Open the “SampleScene“
3. In the script “Assets/Editor/Test.cs” change the “arguments["outputPath"] =” path to the valid path in the macOS (For Windows skip this step)
4. Click on the “MyMenu/RunTest“ on the topbar
5. Navigate to the valid path on your macOS (for Windows: “C:
apkobbtest
LocalBuild.apk“)
6. Observe the “LocalBuild.split.apk“ size
Expected result: The “LocalBuild.split.apk” size is not bloated and is around 40 MB
Actual result: The “LocalBuild.split.apk” size is around 700 MB.
Reproducible with: 2021.3.47f1, 2022.3.54f1, 6000.0.31f1, 6000.1.0a8
Reproducible environment: macOS 15.1.1 (Intel), Windows 10 Pro (22H2)
Not reproducible environment: No other environment tested
Workaround: Add
“
PlayerSettings.Android.useAPKExpansionFiles = true;
buildSettings.options |= BuildOptions.CleanBuildCache;
“
Notes:
- Note that the file size of 'LocalBuild.apk” file is around 700+ MB and the file size of “LocalBuild.split.apk” is also around that size as well but the size for “LocalBuild.split.apk” should be around 30+ MB because the contents have been moved to the OBB file
- Must have an Android module to reproduce
- After the workaround to reproduce the issue either un-zip the project again
Clean build solves the issue, seems to be something like cache issue
Reproducible only when building APK/APK+OBB, AAB works fine