Cloud build failed: Only 8, 16, 24, or 32 bits supported: 872 #244
Comments
Hello @delanick, If you are going to publish your app for the first time, the fastest and easiest way to generate an Android certificate in P12 format is to do so directly with the Keytool (available by default in JDK). The exact command you need to use is outlined in this StackOverflow thread. IMPORTANT: I would recommend to use 10000 (or larger number) for -validity, otherwise, your certificate will be valid only for 1 year. After this time expires, you will not be able to use the certificate to update your published app anymore, because Android certificates cannot be extended or renewed. Regarding the conversion process of a Keystore (or JKS) certificate to a P12 one, it's quite straightforward and as long as you know the password of the certificate and the alias name and password, you should be able to execute the command suggested here and convert the certificate successfully. Having said that, can you tell what is the exact problem that you experience when you run the command? |
Hey @ggarabedian Thanks for responding! I will try create the .p12 directly with your suggested approach and let you know! That's just it, the command to convert says it ran successfully and the file is available in the location - but when using that file to create the release build I still get the same error. That was the source of my confusion... |
@ggarabedian which of the approaches in that Stack Overflow thread you linked is the correct one? They talk about already having a .pfx not.p12 created. Or am I missing something? Apologies, still an amateur! |
@delanick, you are correct and you just need to change the extension of the file that you want to create from .pfx to .p12. The -storetype pkcs12 is the flag that defines the type of the certificate, but the extension still needs to be .p12, otherwise, you will not be able to select it in Sidekick. Here is an example command:
If the name of your certificate contains a white space, you need to wrap it in quotation marks (""). Also, I recommend that you make the alias of your certificate and the file name identical as shown in the example above. |
@ggarabedian your example command gave the following error feedback:
Do you know what the error is? I'm a CLI and Mac noob! |
Ah nevermind. Sorting it out now |
@ggarabedian Still getting event not found |
The command is treated like two separate inputs when you copy and paste it from the provided code snippet. To circumvent this, you should either enter the command manually or copy it from below (where I have shared it as plain text): keytool -genkey -alias mycertificate -keystore mycertificate.p12 -storepass mypassword -validity 10000 -keyalg RSA -keysize 2048 -storetype pkcs12 Additionally, if you are running on a macOS system and you would like to have an exclamation mark (!) in your password (or another special symbol), you must enclose the password in quotation marks ("") and escape the symbol with a backslash (\). For example: -storepass "Delanick\!2345". Finally, please have in mind that you need to safeguard this file very well, because without it you won't be able to publish updates to your application. |
@ggarabedian Thanks so much. I eventually seem to have got it right and have already safeguarded the file :) Problem now is, with so many versions of the command before finally getting it right, I can't remember which command I used. So I've got to try it again and again now. Althoguh, I could use this file to sign all my apps with Nativescript going forward, right? |
@delanick, I am glad to hear that :) And yes, you can use one certificate to sign and publish more than one application. |
@ggarabedian you're a superstar!! Thanks bud, your help is much appreciated!! :) |
Hi all, I've researched this issue with my keystore file - I've seen and tried the suggestions in the articles about converting it and every attempt has failed. This is painfully frustrating and it's the last item on my project list before going live. Can someone please advise? Even if I need to send my .keystore to the {N} team and you guys do it for me - please!
The text was updated successfully, but these errors were encountered: