Single flavor module based on multi flavor library in Gradle

前端 未结 4 1682
北海茫月
北海茫月 2021-01-17 15:07

I\'m working on a multi-flavor app. (gradle files below)

It uses a library called tracker that follow the same flavors internal

4条回答
  •  粉色の甜心
    2021-01-17 15:52

    My gradle version is 4.4.

    In doc, Android developer and Android Plugin DSL Reference show that, should add follow code.

    missingDimensionStrategy 'external'
    missingDimensionStrategy 'target'
    

    Android developer link image

    Android Plugin DSL Reference image

    but it not work for me. Finally I add follow code in feature.gradle.

    flavorDimensions 'target'
    
     productFlavors {
        internal {
            dimension "target"
        }
    }
    

提交回复
热议问题