title: How do I create different flavours while using Google Services in Android Studio?
body: <p>I have an app which uses Google Services (I'm connecting to Firebase). I now want to set it up with two different flavours - free and paid.</p>
  
  <p>I've done the following in build.gradle:</p>
  
  <pre><code>productFlavors {
      free {
          applicationId "myname.appname.free"
          versionName "1.0-free"
          buildConfigField "boolean", "PAID_VERSION", "false"
      }
  
      paid {
          applicationId "myname.appname.paid"
          versionName "1.0-paid"
          buildConfigField "boolean", "PAID_VERSION", "true"
      }
  }
  </code></pre>
  
  <p>From what I've read, syncing this should cause Android Studio do something that sets up the code to 'have' 2 flavours, is that right? The problem is, it won't sync - I get the error:</p>
  
  <pre><code>Error:Execution failed for task ':app:processFreeReleaseGoogleServices'.
  &gt; No matching client found for package name 'myname.appname.free'
  </code></pre>
  
  <p>Everything I've read seems to suggest that I get around this by adding google-services.json into the 'free' and 'paid' folders, but those folders don't exist - maybe Android Studio would set them up if it completed the sync?</p>
  
  <p>Also, in the Firebase console, I currently have one app: myname.appname - do I need to create two apps in there, called myname.appname.free and myname.appname.paid? And download a different google-services.json for each?</p>