androidcordovaphonegap-buildphonegap-cli

How can I signing my apps in cordova 6


I have done my app. It is working well in debugging mode. I am using cordova cli to build apk.

cordova build android

However i have worried about app signing process. Cordova documentation is not clear to me at all. In their documentation confusion arise to me. I have search many time, and find many people suggest many process. So i need actual process. I don't understand what is keystore and what is alise_name too.

So anyone please simply describe the process of app signing with latest cordova in step by step easy process. That will so much helpful to me. Please give an example clearly, by which i can understand properly.

I have found something

In this documentation, i like method 2. But i can't realize it properly. If anyone understand, please give an example about it. Thanks.


Solution

  • I finally made it work:

    1. In cordova CLI...

      cordova build --release android

    2. make a keystore by:

      keytool -genkey -v -keystore "E:/Renascence Soft/Running Projrct/apps keystore/renascence.keystore" -alias renascence -keyalg RSA -keysize 2048 -validity 10000
      
    3. copy renascence.keystore to C:/program file/java/jdk 1.6/bin file:

      jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore renascence.keystore "E:/Renascence Soft/Running Projrct/Renascence App/platforms/android/build/outputs/apk/android-release-unsigned.apk" renascence
      
    4. copy android-release-unsigned.apk file in F:/Public/Android Sdk/sdk/build-tools/23.0.1

    5. Finally Run...

      zipalign -v 4 android-release-unsigned.apk Renascence.apk