question

thejoelrf avatar image
thejoelrf asked thejoelrf answered

No valid certificate found in APK.

I'm getting this error when uploading a new version of the APK

No valid certificate found in APK. The signature file must be called META-INF/CERT.RSA.

But if I check the apk with jarsigner I can see the certificate with the proper name:

      146412 Fri Sep 23 07:41:22 EDT 2022 META-INF/CERT.SF
        1304 Fri Sep 23 07:41:22 EDT 2022 META-INF/CERT.RSA
s     146313 Fri Sep 23 07:41:22 EDT 2022 META-INF/MANIFEST.MF

What could I be doing wrong ?

App Market
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
thejoelrf avatar image
thejoelrf answered

Since no answer has been provided after 3 months. This was the solution:

"Align the zip code after signing the APK"

Sample signing:

~/Library/Android/sdk/build-tools/32.0.0/apksigner sign --ks ~/Downloads/cert.keystore --ks-key-alias cert --v1-signing-enabled=true --v2-signing-enabled=false --v3-signing-enabled=false --v4-signing-enabled=false ~/Downloads/your-apk-name.apk

Sample alignment:

~/Library/Android/sdk/build-tools/32.0.0/zipalign -f 4 ~/Downloads/your-apk-name.apk ~/Downloads/your-apk-name-za.apk

Then you can upload

your-apk-name-za.apk
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community