Android Question jarsigner error: java.security.SignatureException: private key algorithm is not compatible with sign

emt2

Member
Licensed User
Longtime User
Hi, I have my own private key, when I compile with it I get:

Signing package file (private key) Error

jarsigner error: java.security.SignatureException: private key algorithm is not compatible with signature algorithm

Within the Tools Private key settings I see the following:

Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: Fred
Creation date: 19-Feb-2014
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Unknown, OU=Fred Ltd, O=Fred Ltd, L=Unknown, ST=Unknown, C=UK
Issuer: CN=Unknown, OU=Fred Ltd, O=Fred Ltd, L=Unknown, ST=Unknown, C=UK
Serial number: *REMOVED*
Valid from: Wed Feb 19 12:00:25 GMT 2014 until: Sun Jul 07 13:00:25 BST 2041
Certificate fingerprints:
MD5: *REMOVED*
SHA1: *REMOVED*
Signature algorithm name: SHA1withRSA
Version: 3
*******************************************
*******************************************

I generated the key using:

"C:\Program Files (x86)\Java\jdk1.6.0_31\bin\keytool.exe" -genkey -v -keystore fred.keystore -alias fred -keyalg RSA -keysize 2048 -validity 10000

Please help.

Note I have existing apps using Phonegap and need to use the same key.

Thanks
 

emt2

Member
Licensed User
Longtime User
Understood. Although it's important that I am able to demonstrate a release APK without the debug baggage and bloat as we are at the investigation stage withh B4A at the moment. Thus I think I will create a new private key rather than use a debug key. As a wishlist feature it might be good to allow more flexibility on the signing method used by the IDE but this is not critical.

Many Thanks, Erel.

Regards,

Martin
 
Upvote 0

emt2

Member
Licensed User
Longtime User
Note that the Debug signing key has nothing to do with the debugger (except for its name...).

It is just a sign key that you can use during development.

Of course! It's the absence of a key that produces a debug APK - my apologies! The fluidity of deployment to devices has meant I have so far not had to look at the physical file in the file system. ;)

Many Thanks!
 
Upvote 0
Top