Search Issue Tracker
By Design
By Design in 2023.2.X
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- 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
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.
Resolution Note (2023.2.X):
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.