作者:张春雷11111 | 来源:互联网 | 2023-09-23 10:28
前景提要
gradle assembleRelease
此命令用于编译并生成Release的包
但在未经过任何配置的情况下,生成的是没有签名的apk,(即app-release-unsigned.apk)
生成apk并签名
那么,如何在打包的时候给apk加上签名?
修改Mode下的build.gradle文件
android {signingConfigs {releaseConfig {keyAlias 'stone'keyPassword 'mypwd'storeFile file('/Users/stone/Documents/project_AS/myapplication/stone.keystore')storePassword 'mypwd'}}buildTypes {release {...signingConfig signingConfigs.releaseConfig}}}
具体参考
https://blog.csdn.net/jjwwmlp456/article/details/44942109