1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Android APK Signing fail ! [SOLVED]

Discussion in 'Programming' started by Kasra_n, Aug 17, 2019.

  1. Kasra_n

    Kasra_n Member

    Joined:
    Jun 19, 2019
    Posts:
    26
    Hi there, why this happen ?
    Code:
    ```
    jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 5997 but got 6083 bytes)
    cmd /c ""C:\Android\android-sdk\build-tools\24.0.0\zipalign.exe" -v 4 "C:\Users\Gamemaker Studio\AppData\Local\Temp\gm_ttt_35938\gm_ttt_16191\bin\RunnerActivity-release.apk" "C:\Users\Gamemaker Studio\Desktop\android_test.apk""```
    it was worked on same sdk ndk and jdk, suddenly it happened
     
    Last edited: Aug 20, 2019
  2. Kasra_n

    Kasra_n Member

    Joined:
    Jun 19, 2019
    Posts:
    26
    i tryed to read oracle docs about this problem, the only thing i found was: oracle is pointing at zipping algorithms and the diffrent sizes that they make, but iam not an expert, i just followed yoyo manuals and it was fine but suddenly crashed !, really no ones here dont know the answer ?
     
  3. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    212
    change the name of android_test.apk to androidtest.apk

    an clean the cache of the project.


    i don't think that this will solve it , but better try it.
     
    Kasra_n likes this.
  4. Kasra_n

    Kasra_n Member

    Joined:
    Jun 19, 2019
    Posts:
    26
    sure, but that cant be the reason, actually game maker force the apk to sign and align in the same time(and any returned values like 2, 0 [described in oracle manual] from the jdk tools will fail the build) iam worry about this that the game maker is trying to sign a debug apk, (debug apks have their own specific debug sign) so it mean trying sign a signed app ,i wish at lest i could access the noone aligned/signed apk after build to sign it manually, so now any attempts will corrupt the apk, i tryed rename the apk to .zip then removed the meta-inf folder and signed it, but still got that play protect warning, iam pretty sure that there is some beyond the jdk that we dont know about, iam trying to contact oracle to find the real reason, so i will get the answer soon and will share it, and by the way thanks for the reply ;)
     
    Last edited: Aug 20, 2019
  5. Kasra_n

    Kasra_n Member

    Joined:
    Jun 19, 2019
    Posts:
    26
    sure, i found the reason, let me share it with people who still have this problem, actually the reason is a "corrupted keystore", it is a bit long if i want to describe how a keystore will generate and become corrupt, but for a short answer: go to your java folder and generate a new keystore manualluly instead of clicking generate in gm prefrence tab, and place it instead the patch in the android prefrence tab in GM (there is simple manuals for gen-key in google), so people who use gm 1.4 can use this, iam not sure about 2, cuz i usually developing for hobby, and dont have money to buy modules in 2, but if you want to sign something and the signer fails it mean the sign key is corrupted, happy coding, and let me know if you have any problem with playprotect warnings, sometimes it happen for diffrent reasons.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice