keystore creation

来源:互联网 发布:百度大数据产品 编辑:程序博客网 时间:2024/06/06 07:20

Signing

  • By default, there is a debug configuration that is setup to use a debug keystore, with a known password and a default key with a known password.
  • The debug keystore is located in $HOME/.android/debug.keystore, and is created if not present.

Creating custom signing keys

cd signingmkdir keyscd keyskeytool -genkey -v -keystore debug.keystore -alias AndroidDebugKey -keyalg RSA -keysize 2048 -validity 10000keytool -genkey -v -keystore release.keystore -alias AndroidReleaseKey -keyalg RSA -keysize 2048 -validity 10000

Configuration for custom signing keys

android {        signingConfigs {        debug {            storeFile file('keys/debug.keystore')            storePassword 'android'                   <--- Externalize password            keyAlias 'AndroidDebugKey'            keyPassword 'android'                     <--- Externalize password        }        release {            storeFile file('keys/release.keystore')            storePassword 'android'            keyAlias 'AndroidReleaseKey'            keyPassword 'android'        }    }    buildTypes {        release {            signingConfig signingConfigs.release      <--- Apply signing configuration        }    }}
0 0
原创粉丝点击