Cannot add buildConfigField in productFlavors

前端 未结 2 726
长情又很酷
长情又很酷 2021-01-17 10:56

In my android{} section I tried to put two different build types for may free and paid app.

Sadly I\'m getting gradle error:

Gradle \'android

相关标签:
2条回答
  • The correct syntax for the buildConfigField lines is:

    buildConfigField "boolean", "MY_FLAG", "true"
    

    In other words, the strings need to be separated by commas.

    0 讨论(0)
  • 2021-01-17 11:16

    In my case:

    buildConfigField ("transport.product_flavors.MonetizationType", "MONETIAZATION_TYPE", "transport.product_flavors.MonetizationType.FREE")

    0 讨论(0)
提交回复
热议问题