This error is caused by zipflinger’s exception (new ZIP library by Google).
Error
Caused by: java.lang.IllegalStateException: Long cannot fit in uint at com.android.zipflinger.Ints.longToUint(Ints.java:31) at com.android.zipflinger.CentralDirectoryRecord.write(CentralDirectoryRecord.java:78) at com.android.zipflinger.CentralDirectory.write(CentralDirectory.java:114) at com.android.zipflinger.ZipArchive.writeArchive(ZipArchive.java:194) at com.android.zipflinger.ZipArchive.closeWithInfo(ZipArchive.java:166) at com.android.zipflinger.ZipArchive.close(ZipArchive.java:155)
File length limits would depend on the filesystem. Most uSD cards will use FAT32. But you’re jumping to the conclusion that the error came from exceeding a file length. It seems something is calling the API with the wrong kind of variable, which could be for any number of reasons that are internal to that library or the function calling it.
Did this error occur on other versions of Unity? Are you calling the zip API yourself?
The error is a runtime exception. It’s not necessary a bug. Is it possible that your apk file gets larger than 4GB?
Android apk file cannot be larger than 4GB because it’s a zip archive and that is a limitation of zip (the simple one, there are extended versions that can be larger, but I don’t know if Android supports those, likely no due to tooling not supporting it).