How to create a signed and unsigned working .apk using cordova?

前端 未结 2 1115
夕颜
夕颜 2021-01-16 09:11

I am trying to create an .apk file for my mobile using cordova (Android) platform on ubuntu 14.04.

for unsigned i used command

$ cordova build --re         


        
2条回答
  •  孤街浪徒
    2021-01-16 09:36

    Create a keystock for signed apk

    a.  keytool -genkey -v -keystore NAME-mobileapps.keystore -alias NAMEmobileapps -keyalg RSA -keysize 2048 -validity 10000
    b.  create a file inside android folder using name "ant.properties"
    c.  Add these line with your keystock full path and alise name.
        key.store=/home/chandradeo/xxx.keystore
        key.alias=xxx
    

    Run command

    $ cordova build android --release
    

    or

    $ cordova build --release android
    

    This will give you both signed and unsigned apk under ant-build folder

    Thanks

提交回复
热议问题