Skip to content

Godot 4.4.1 fails to align APK if the project's PNG file count exceeds ~32k #106857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
PosionFox opened this issue May 27, 2025 · 0 comments
Open

Comments

@PosionFox
Copy link

Tested versions

Reproducible in: 4.4.1.stable

System information

Windows 11 - Godot 4.4.1.stable - Mobile/Compatiblity - NVIDIA geforce RTX 3060

Issue description

For some reason Godot cannot align the Android APK properly when you have over 32k pngs in your game, which also causes the ApkSigner to fail as well.

Godot export:
Project export for platform: Android - Failed.
[Code Signing]: 'apksigner' returned with error #1
[Code Signing]: output:
Exception in thread "main" com.android.apksig.apk.ApkFormatException: Unused space at the end of ZIP Central Directory: 182827 bytes starting at file offset 98106766
at com.android.apksig.ApkSigner.parseZipCentralDirectory(ApkSigner.java:944)
at com.android.apksig.ApkSigner.sign(ApkSigner.java:277)
at com.android.apksig.ApkSigner.sign(ApkSigner.java:232)
at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:414)
at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:92)

zipalign -c -v 4 outputs this:
Verifying alignment of PRNeo.apk (4)...
Unable to open 'PRNeo.apk' for verification

Steps to reproduce

Create an empty project, then add 32.000(or more) png files to your project.

Minimal reproduction project (MRP)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: For team assessment
Development

No branches or pull requests

2 participants