Search Issue Tracker
Third Party Issue
Third Party Issue in 6000.1.X
Votes
0
Found in
2021.3.47f1
2022.3.54f1
6000.0.31f1
6000.1.0a8
Issue ID
UUM-90846
Regression
No
[Android] The APK is bloated after generating it with the Application Binary Split enabled when immediately before an APK was generated with Application Binary Split disabled
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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Package signature validation unexpectedly return an invalid signature status if the validation check is done after the code signing certificate validaty range has passed
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
Resolution Note:
This problem is reproducible only if building development builds. When building release builds (where size really matters), everything is fine. The problem is not Unity specific, it's just the way how Gradle (or AGP) generates debug APK, most likely it tries to re-use previous APK if it exists.
This problem can be reproduced in Android Studio using these steps:
- create an empty project in Android Studio
- copy some relatively large (~100Mb) zip file to app/src/main/assets/bin
- build debug APK (app/build/outputs/apk/debug/app-debug.apk), it's size would be slightly larger than 100Mb
- delete this zip file
- build debug APK again, it's size would still be almost the same
Resolution Note (6000.1.X):
This problem is reproducible only if building development builds. When building release builds (where size really matters), everything is fine. The problem is not Unity specific, it's just the way how Gradle (or AGP) generates debug APK, most likely it tries to re-use previous APK if it exists.
This problem can be reproduced in Android Studio using these steps:
- create an empty project in Android Studio
- copy some relatively large (~100Mb) zip file to app/src/main/assets/bin
- build debug APK (app/build/outputs/apk/debug/app-debug.apk), it's size would be slightly larger than 100Mb
- delete this zip file
- build debug APK again, it's size would still be almost the same