I just created NativeScript Angular App. In order to create apk file for release tns build android --release
requires .keystore file.
Where do I get it and What are the steps I should follow to get it?
I like to use the commands described in this guide.
First, we need to have a "signing key" in order to make a release build.
I like the use the keytool command described above to create the jks file:
keytool -genkey -v -keystore my-app-android-key.jks -keyalg RSA -alias myAlias
If you have properly set up the Android sdk for NativeScript developement then you should have "keytool" already in your PATH so that you can use it from anywhere.
I like to make a "keys" folder in the root of my ns project. While inside of this folder, we can run the keytool command to put it there.
The keytool command starts a little interactive prompt that asks you to two different passwords.
Then back in the project root we can run the build command with the --release flag and other key flags:
ns build android --release --key-store-path keys/my-app-android-key.jks --key-store-password myGoodPw1 --key-store-alias myAlias --key-store-alias-password myGoodPw2
You may or may not need to add the --force
flag when you do a build...
You'll know it worked when you see the success message:
Project successfully built.
Good luck!