Android Question Can't get the right key (.keystore)?

MrKim

Well-Known Member
Licensed User
Longtime User
I am trying to update an app. The last time I updated it I had this code:
B4X:
#if AAB
    #SignKeyFile: D:\Android\KeyStores\DataCollection1.keystore
    #SignKeyPassword: adfaefef
    #SignKeyAlgorithm: -digestalg SHA1 -sigalg SHA256withRSA
#end if
I am now on B4A version 12.20 (64 Bit). When trying to build an app bundle I get this error:
B4X:
jarsigner error: java.lang.IllegalArgumentException: key algorithm not compatible with signature algorithm
A search for that led me here:
Where @Erel said in post 3:, "This is not needed with B4A 11.0."
So I commented the above and the the app bundle is created OK but when I try to upload it I get:
B4X:
Your Android App Bundle is signed with the wrong key. Ensure that your App Bundle is signed with the correct signing key and try again. Your App Bundle is expected to be signed with the certificate with fingerprint:
Etc....

Any help appreciated.
 
Last edited:
Solution
I resolved it. Once again I have egg on my face. I had the wrong file. I looked at old backups and for some reason I had changed the the file at some point.

MrKim

Well-Known Member
Licensed User
Longtime User
Remove only this line and try again
B4X:
 #SignKeyAlgorithm: -digestalg SHA1 -sigalg SHA256withRSA
No joy. Compiles but still wrong key error.
I notice the compiler now using different algo:

B4X:
Signing AAB file    (2.53s)
    Algorithm: -digestalg SHA1 -sigalg SHA256withDSA
 
Upvote 0

MrKim

Well-Known Member
Licensed User
Longtime User
I resolved it. Once again I have egg on my face. I had the wrong file. I looked at old backups and for some reason I had changed the the file at some point.
 
Upvote 0
Solution
Top