Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/u011033906/article/details/90486176
Sometimes debugging SDK
must use release
version, but each package confused too much trouble, hoping to IDE
directly ran the release
version of the application, is simply in debug
generating mode release
version app
, this time how to do it?
When we use AS
the Gradle
following would be a very simple solution to this problem.
In the Gradle
introduction of the following code:
//配置keystore签名
signingConfigs {
release {
keyAlias 'key'
keyPassword 'keyPassword '
storeFile file('C:/.../yourAPK.jks')
storePassword 'storePassword '
}
}
buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
signingConfig signingConfigs.release
}
}
Such translation of the debug
version of the direct use of the official signature.