I am working on an app that needs two productFlavors, so I modified my gradle file this way:
productFlavors {
free {
applicationId = "com.udacity.gradle.builditbigger.free"
}
paid {
applicationId = "com.udacity.gradle.builditbigger.paid"
}
}
Now since I use Google Ads inside my app, they provided the google-services.json
file, now this is causing a lot of trouble.
Since this is not something new, I tried this thread.
And I modified my dependencies to:
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.gms:google-services:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Now the problem is , when i sync the gradle file, respective directories for free and the paid versions are not created, also, I get an error
Error:Execution failed for task ':app:processPaidReleaseGoogleServices'.
No matching client found for package name 'com.udacity.gradle.builditbigger.paid'
above which Parsing json file:D:\ud867\FinalProject\app\google-services.json
failed.
Now, if anyone experienced similar problem, please do share the fix you applied to solve the problem, Thanks!