android {
compileSdkVersion 21
buildToolsVersion "21.1.0"
defaultConfig {
applicationId "com.test.example"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
signingConfigs {
debug {
File strFile = new File("../../Keystore/Debug/debug.jks")
storeFile file(strFile)
storePassword "storeDebug1234567890"
keyAlias "debugkey"
keyPassword "aliasDebug1234567890"
//println strFile.absolutePath;
}
release {
File strFile = new File("../../Keystore/Release/release.jks")
storeFile file(strFile)
storePassword "storeRelease1234567890"
keyPassword "keyRelease1234567890"
keyAlias "releasekey"
// println strFile.absolutePath;
}
}
buildTypes {
release {
signingConfig signingConfigs.release #缺少这段,或者buildtypes在signingconfigs签名
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}