naeemqaswar
10/16/2019 - 10:55 AM

Build Signed APK

1- In CMD, Change dir to jdk installation dir (/usr/lib/jvm/default-java/bin) and create keystore using following command:
"keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000"
2- Now, change directory to the root of your project and run following command:
"cd android && ./gradlew assembleRelease"
3- Find APK at this location: "/android/app/build/outputs/apk/release/app-release-unsigned.apk"
4- Copy this APK to bin folder of jdk installation directory and run following command:
"jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release.apk alias_name"
5- Hurray, its Done :)