add multiple google-service.json file in product flavor
Asked Answered
U

0

1

I have 3 different Firebase projects. and it has to be used in 4 google-service.json use in product flavors. but i get an below error

File google-services.json is missing. The Google Services Plugin cannot function without it.

for below structure

enter image description here

And if I put the google-service.json in the app folder then i get this error

No matching client found for package name 'com.example.app1'

for below structure

enter image description here

build.gradle

 flavorDimensions "category", "app"

    productFlavors {
        mcq1 {
            applicationIdSuffix ""
            dimension "category"
        }
        mcq2 {
            applicationIdSuffix ""
            dimension "category"
        }
        mcqappgj {
            dimension "app"
            applicationId "com.example.app1"
            versionCode 9
            versionName "1.0.7"
        }
        mcqappen {
            dimension "app"
            applicationId "com.example.app2"
            versionCode 7
            versionName "1.0.6"
        }
        gpscapp {
            dimension "app"
            applicationId "com.example.app3"
            versionCode 2
            versionName "1.0.1"
        }
        eemcq {
            dimension "app"
            applicationId "com.example.app4"
            versionCode 2
            versionName "1.0.1"
        }
    }
Untutored answered 20/11, 2019 at 18:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.