versionNameSuffix does not work in Android studio 4.1.0

Viewed 79

As you know, gradle stopped (official documentation) support VERSION_CODE and VERSION_NAME in the Gradle DSL. For more info click hire. So, I added this code (app build.gradle):

        defaultConfig {
        versionCode 1
        versionName "1.0" 
        buildConfigField 'int', 'VERSION_CODE', "1"           //fix issue
        buildConfigField 'String', 'VERSION_NAME', "\"1.0\"" //fix issue
        }
//..
        buildTypes {
             debugToast{
               versionNameSuffix "-debug(Toasts)" //NOW DOES NOT WORK !!
             }
        }
//..

And my question: How fix versionNameSuffix method, because it doesn't work?

0 Answers
Related