在app.gradle中的android里添加如下代码:
然后再做如下设置:signingConfigs { debug { storeFile file("../yourapp.keystore")
} release { storeFile file("../yourapp.keystore") storePassword "your password" keyAlias "your alias" keyPassword "your password" } }storePassword "your password" keyAlias "your alias" keyPassword "your password"
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
}
}