Create a keystore keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key /android文件夹下生成属性文件关联秘钥 key.properties storePassword=<password from previous step> keyPassword=<password from previous step> keyAlias=key storeFile=<location of the key store file, such as /Users/<user name>/key.jks> /android/app/build.gradle文件里增加load代码 def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } android { ... } 在buildTypes之前增加签名配置代码 signingConfigs { release { keyAlias keystoreProperties['keyAlias']……
阅读全文