android - Cannot add buildConfigField in productFlavors -


In my Android {} section I tried to enter two different building types for free and paid apps.

Unfortunately I'm getting the Gradle error:

Gradle 'android-transport' project failed to refresh: Script error creation, unsupported Gradle DSL method found: 'buildConfigField () '! Possible reasons are: - You are using the Gradele version where the method is absent - you have not implemented the Grade plugin that provides the method - or there is a mistake in the build script

this is my Android {} Gradle is part of the building:

  Android {compileSdkVersion 19 buildToolsVersion "19.0.3" defaultConfig {minSdkVersion 10 targetSdkVersion 19 versionCode 1 versionName "1.0"} {compileOptions sourceCompatibility JavaVersion. VERSION_1_6 targetCompatibility JavaVersion.VERSION_1_6} {buildTypes release {runProguard true proguardFiles getDefaultProguardFile ('ProGuard-android.txt' ), 'ProGuard-rules.txt'} {debug debug true runProguard false}} {productFlavors free {PackageName "pl.grzeslowski.transport .free" buildConfigField "transport.product_flavors.MonetizationType" "MONETIAZATION_TYPE" "transport.product_flavors.MonetizationType. FREE "} {paid PackageName" pl.grzeslowski.transport.paid "buildConfigField" transport.product_flavors.Monetization type "" MONETIAZATION_TYPE "" transport.product_flavors.MonetizationType.PAID "}}}   

And this is my console log:

Performance: [: Transport: compiled debug]]

On-demand configuration is an incubating feature. Download Download Download Download Download Download

Failure: With the exception, be unsuccessful.

  • Where: Create the file 'D: \ Programmable \ Geet Project \ Transportation \ Androft-Transport \ Transportation \ Build.Gradeal line': 77

  • What happened:

    The manufacturing method for the argument [Confiffild () could not get [transport.product_flavors.MonetizationType] GroupableProductFlavorDsl_Decorated {name = free, minSdkVersion = -1, targetSdkVersion = -1, renderscriptTargetApi = - 1, renderscriptSupportMode = zero, renderscriptNdkMode = null, versionCode = -1, versionName = null, Package name = transport.free, testPackageName = null, testInstrumentationRunner = null, testHandleProfiling = null, testFunctionalTest = null, Hstakshrng = nULL, resConfig = null}. Try

  • Try: Get rid of the stacktrace option with the - o track stack trace - to get more log output - - or --debug option Run along.

    build fail

    total time: 9.781 seconds

    buildConfigField

    / Code>

    In other words, the string needs to be separated with a comma.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -