Android Studio: How to exclude google-services module in product flavor?

后端 未结 3 1284
没有蜡笔的小新
没有蜡笔的小新 2021-01-17 18:58

In my Android project, there are several product flavors:

buildTypes {
    release {}
    debug {}
    staging {}
}

productFlavors {
    freeVersion {}
             


        
3条回答
  •  一向
    一向 (楼主)
    2021-01-17 20:04

    I misread the question initially. To exclude the free version you would use proVersionCompile and partnerVersionCompile with the desired dependency to exclude the freeVersion.

    dependencies {
        proVersionCompile 'com.google.android.gms:play-services-analytics:8.4.0'
        partnerVersionCompile 'com.google.android.gms:play-services-analytics:8.4.0'
    }
    

提交回复
热议问题