原因:运行的话生成debug包 不配置的话是使用Android默认的签名文件
解决:
build.gradle(:app)文件
在release 下面加个debug
android{
signingConfigs{
release{
storeFile file('../xx.jks')
storePassword'xxx'
keyAlias'xxx'
keyPassword'xxx'
}
config{
storeFile file('../xx.jks')
storePassword'xxx'
keyAlias'xxx'
keyPassword'xxx'
}
}
buildTypes{
release{
minifyEnabledfalse
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug{
signingConfig signingConfigs.config
}
}
}
--------------------------------------------
签名打包时报错:
Cause: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded
原因:
build.gradle(:app)文件里 签名密码配置错误
网友评论