app下build.gradle

..
android {
    ..
    signingConfigs {
        release {
            storeFile file('../keyStore.jks')
            storePassword '123456'
            keyAlias = 'XXX'
            keyPassword '123456'
        }
        debug {
            storeFile file('D:\\Dev\\Android\\MyApplication\\keyStore.jks')
            storePassword '123456'
            keyAlias = 'XXX'
            keyPassword '123456'
        }
    }
    ..
}

对应路径和别名改成自己的,之所以用绝对路径,是因为debug和release所在路径不同