-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
Hello! During the first installation of the minimal example i'm facing this issue:
holdmylatte@Antons-MacBook-Pro minimal % zig build -Dtarget=aarch64-linux-android
holdmylatte@Antons-MacBook-Pro minimal % adb install zig-out/bin/minimal.apk
Performing Streamed Install
adb: failed to install zig-out/bin/minimal.apk: Failure [-124: Failed parse during installPackageLI: Targeting R+ (version 30 and above) requires the resources.arsc of installed APKs to be stored uncompressed and aligned on a 4-byte boundary]
zipalign shows that resources.arsc is compressed after compilation:
holdmylatte@Antons-MacBook-Pro minimal % zipalign -vc 4 zig-out/bin/minimal.apk
Verifying alignment of zig-out/bin/minimal.apk (4)...
53 AndroidManifest.xml (OK - compressed)
769 classes.dex (OK - compressed)
1407 lib/arm64-v8a/libmain.so (OK - compressed)
937857 lib/armeabi-v7a/libmain.so (OK - compressed)
1944746 lib/x86/libmain.so (OK - compressed)
3018802 lib/x86_64/libmain.so (OK - compressed)
3979963 res/mipmap/ic_launcher.png (OK - compressed)
3984381 resources.arsc (OK - compressed)
3984700 META-INF/DEFAULT.SF (OK - compressed)
3985170 META-INF/DEFAULT.RSA (OK - compressed)
3987101 META-INF/MANIFEST.MF (OK - compressed)
Verification succesful
I found some workaround through unzip and zip resources.arsc again without compression, but it requires signing apk again. Perhaps there is already an off-the-shelf solution that would be built into the build process?
os: macos sequoia 15.3.2
zig version: 0.14.0
simulator: Pixel 8 API 35
Metadata
Metadata
Assignees
Labels
No labels