How do I export my game (signed release apk, keystore not working)?

0 favourites
  • 7 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Hello,

    I'm trying to export my new game as a signed release apk with the C3 build service. (exporting as a debug apk works fine)

    I've created a keystore using C3.

    But if I use the keystore now (alias = key name, passwords also correct, checked it 3 times...) the buildservice crashes and says something like incorrect keystore...

    I already have a published app and there everything went fine with the C3 keystore generation and C3 signed apk build.

    Here is the full error-log:

    Error: Failed to load signer "signer #1" java.io.IOException: Failed to obtain key with alias "production" from tmp/bb2baa0a-350a-4e32-9edd-ef3e9ce28258. Wrong password? at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCertsFromKeyStore(ApkSignerTool.java:690) at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCerts(ApkSignerTool.java:555) at com.android.apksigner.ApkSignerTool$SignerParams.access$200(ApkSignerTool.java:509) at com.android.apksigner.ApkSignerTool.sign(ApkSignerTool.java:215) at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:89) Caused by: java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. at sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:435) at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70) at java.security.KeyStore.getKey(KeyStore.java:1023) at com.android.apksigner.ApkSignerTool$SignerParams.loadPrivateKeyAndCertsFromKeyStore(ApkSignerTool.java:663) ... 4 more Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. at com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:975) at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1056) at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853) at com.sun.crypto.provider.PKCS12PBECipherCore.implDoFinal(PKCS12PBECipherCore.java:405) at com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineDoFinal(PKCS12PBECipherCore.java:437) at javax.crypto.Cipher.doFinal(Cipher.java:2164) at sun.security.pkcs12.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java:371) ... 8 more

    Tagged:

  • Just another information:

    I now used the keystore from my first app (which is already published) and now it works...

    Just the question:

    Can I use the same keystore for 2 apps?

    Thanks!

  • Yes, you can use the same keystore for multiple apps.

    Google actually recommends it.

  • Thanks!

    Anyone an idea why it didn't work with a second keystore? Or can you only create 1?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi guys, I have the same situation. I tried to create a new keystore for a new project and it don´t worked. But, since I was read this tread, I´m using the keystore of my first project and it works well. I don't remember the tutorial very well, but I thought I could create a keystore for each project.

    Now I can continue with development.

    Regards!

  • I was getting the same problem and ended up in this post. If anyone else shows up here to solve this you have to put the same password on all four fields. So Keystore and key password must match.

  • I was getting the same problem and ended up in this post. If anyone else shows up here to solve this you have to put the same password on all four fields. So Keystore and key password must match.

    Yes, this seemed to be my problem as well. I'm not sure why the passwords need to be the same for both, but this fixed me from having the "Failed to load signer" issue.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)