Android signing with Ant

前端 未结 6 1484
感动是毒
感动是毒 2020-12-01 01:27

Using Ant, I\'m trying to build an Android application in release mode for distribution. My problem is at the signing process. I\'ve created a keystore and alias via Eclipse

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 02:07

    Using Ubuntu 14.04 (Trusty Tahr) and Windows, create a “.keystore” file.

    This file needs to be generated, which can be done with the keytool command that comes with Java. It can typically be found at ‘C:\Program Files\Java\jre7\bin’. Which also has to be added to your PATH variable.

    Go to the root of your project and use this command:

    Generating a .keystore file:

    $ keytool -genkey -v -keystore key-name.keystore -alias alias-name -keyalg RSA -keysize 2048 -validity 10000
    

    Create a file called ant.properties in the folder “platforms/android/” ant.properties.

    key.store=D:\\path\\to\\the\\project\\keyname.keystore
    key.alias=alias-name
    

    Create the build APK file:

    $ cordova build android --release
    

提交回复
热议问题