reflex-frp / reflex-platform

A curated package set and set of tools that let you build Haskell packages so they can run on a variety of platforms. reflex-platform is built on top of the nix package manager.
https://reflex-frp.org
BSD 3-Clause "New" or "Revised" License
723 stars 164 forks source link

App Store rejects apk as being not zipalign processed #795

Closed nomeata closed 2 years ago

nomeata commented 2 years ago

Returning to my Android experiments I wanted to upload a new version of a reflex-platform based app that I managed to build and upload before.

I built it with isRelease = true, then took result/android-app-release-unsigned.apk, signed it with jarsigner and uploaded it to the Play Store Console, only to get an error

Du hast eine APK-Datei hochgeladen, die nicht über das zipalign-Tool ausgerichtet wurde. Du musst das zipalign-Tool in deiner APK-Datei ausführen und sie erneut hochladen.

I upgraded my reflex-platform pin to the latest revision (8f8d5efc7b844d6eb0b9d909beb3450c1db026dd), in case this is a new requirements. But I do see

              zipAlignEnabled true

in the generated gradle file, so this does not seem to be it. Maybe I am just doing it wrong, and misremember how I created a releaseable apk before. But what should I be doing?

nomeata commented 2 years ago

Ah, here is some useful pointers: https://stackoverflow.com/a/9911700/946226

It seems that zipalign has to be run after jarsigner. Maybe I should try apksigner instead, which can run after zipalign.

nomeata commented 2 years ago

Ah, indeed, with apksigner (in nix package apksigner) this works… Closing this, maybe someone will stumble over this and find it useful.

Now stuck that the Play Store requires the app to target API Level 30, not 29…