Android Studio debug mode with release

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 SDKmust use releaseversion, but each package confused too much trouble, hoping to IDEdirectly ran the releaseversion of the application, is simply in debuggenerating mode releaseversion app, this time how to do it?

When we use ASthe Gradlefollowing would be a very simple solution to this problem.

In the Gradleintroduction 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 debugversion of the direct use of the official signature.

Guess you like

Origin blog.csdn.net/u011033906/article/details/90486176