How to run native Android custom build type?

So, I'm trying to get my project to create a signed and aligned apk and run it on my phone through the Android Studio platform.

My build.gradle looks like this:

signingConfigs {
    release {
        keyAlias 'key'
        keyPassword 'pwd'
        storeFile file('..\\m-release-key.keystore')
        storePassword 'pwd'
    }
}
buildTypes {
    release {
        debuggable false
        jniDebugBuild false
        signingConfig signingConfigs.release
        runProguard false
        zipAlign true
    }
}

The problem is that when I create, all that is created is debug-unaligned.apk, whether I click on Run or Debug, I get the same thing. I do not see any settings for this in the build configurations. How can I tell Android Studio to use my release build type? What am I missing?

+4
source share
1 answer

Build Variants, :

IDE screenshot, showing Build Variants tool window

+13

Source: https://habr.com/ru/post/1531609/


All Articles