Android Studio 3.0 build options don't match tastes

I am trying to configure various build options for Android Studio 3.0 and gradle plugin 3.0, but Android Studio does not create a build option for every taste of mine. gradle build is successful, but I don't know how to make productionapiRealese and germanyapiRelease build options. How can i do this?

My tastes:

flavorDimensions "pr", "ger"
productFlavors {
    productionapi {

        provider "pk"
        dimension "pr"

    }
    germanyapi {
        provider "sd"
        dimension "ger"
    }
}

And my build options:

enter image description here

+4
source share
1 answer

First of all, read the article .

As I understand it, you mix flavors using the information you can find in this section, โ€œCombine the flavors of several foods with taste dimensions.โ€

Just delete this:

flavorDimensions "pr", "ger"

and this is from every flavor:

dimension "ger"
dimension "pr"

" ":

android {
    ...
    defaultConfig {...}
    buildTypes {...}
    flavorDimensions "default"
    productFlavors {
        productionapi {
            applicationIdSuffix ".prod"
            versionNameSuffix "-prod"
        }
        germanyapi {
            applicationIdSuffix ".german"
            versionNameSuffix "-german"
        }
    }
}

, .

+3

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


All Articles