Search Issue Tracker
By Design
Votes
0
Found in
2023.2.0a6
Issue ID
UUM-27042
Regression
No
Gradle throws errors when attempting to build APK with 2GB or larger assets
Reproduction steps:
1. Open the attached "BugRepro" project
2. Open the "Assets/Scenes/SampleScene.unity" scene
3. Click File > Build Settings... > Build
Expected results: The project is successfully built
Actual results: The project building proccess stops with the "CommandInvokationFailure: Gradle build failed. " error
Reproduced with: 2020.3.46f1, 2021.3.21f1, 2022.2.12f1, 2023.1.0b9, 2023.2.0a7
Reproduced on: Windows 11 Pro 22H2
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
- Warning of an unknown Script missing is logged when selecting VFX in Play Mode
- Vertical and horizontal scrollbars appear and disappear when dragging an attribute to a different position within the Shader Graph Hierarchy
- AudioSource.PlayDelayed() does not work with Audio Random Containers
- Compatible with the VFX Graph Shader Graph can't be dragged and dropped into the "Output" block from the Project window
- [Silicon] Freeze/crash on BrotliDecoderDecompressStream when using System.IO.Compression.BrotliDecoder.TryDecompress
Resolution Note:
The "BugRepro" from Google drive has no chance to build, while users provided project builds fine, but I have removed the magic leap packages to build it.
Android .apk file is a zip file and it doesn't support Zip64 extension (https://en.wikipedia.org/wiki/ZIP_(file_format)#ZIP64), so it is limited to 4GB total and each file that's put into it is also limited to 4GB before compression.
If a failure encountered withing these limits, it's best to create an simple project using Android Studio and put asset files to it's asset directory. If that makes it fail to build, the issue is with Gradle or Android Gradle plugin. Given that Play store doesn't allow multi-gigabyte size files to be uploaded, not a big surprise the tools don't support it either.