title: Error: Could not parse the Android application Module's Gradle Config
body: <p>I've been trying to setup Firebase in my Android project.
  Problem is, I've been getting this error:</p>
  <blockquote>
  <p>Could not parse the Android application Module's Gradle Config</p>
  </blockquote>
  <p>And I really can't solve it.</p>
  <p>I've seen quite a lot of people getting this error, but it seems that they could solve it by upgrading their build tool version, or by updating google-services. I've done all that and haven't been able to make it work so far.</p>
  <p>Here are my Gradle scripts:</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  signingConfigs {
      AndroidAppPro {
      }
  }
  compileSdkVersion 25
  buildToolsVersion '26.0.0'
  useLibrary 'org.apache.http.legacy'
  defaultConfig {
      applicationId &quot;com.critizr.pro&quot;
      minSdkVersion 14
      targetSdkVersion 25
      versionCode 9
      versionName &quot;1.5.1&quot;
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
      }
  }
  productFlavors {
      preprod {
          applicationId &quot;com.cr.pro&quot;
          buildConfigField 'boolean', 'IS_PROD', 'false'
          buildConfigField 'String', 'HOST', '&quot;https://myurl.com/&quot;'
      }
      prod {
          applicationId &quot;com.cr.pro&quot;
          buildConfigField 'boolean', 'IS_PROD', 'true'
          buildConfigField 'String', 'HOST', '&quot;https://myurl/&quot;'
      }
  }
  packagingOptions {
       exclude 'META-INF/DEPENDENCIES.txt'
       exclude 'META-INF/LICENSE.txt'
       exclude 'META-INF/NOTICE.txt'
       exclude 'META-INF/NOTICE'
       exclude 'META-INF/LICENSE'
       exclude 'META-INF/DEPENDENCIES'
       exclude 'META-INF/notice.txt'
       exclude 'META-INF/license.txt'
       exclude 'META-INF/dependencies.txt'
       exclude 'META-INF/LGPL2.1'
     }
  }
  
  dependencies {
  compile project(':lib-viewflow')
  
  // new libs
  compile 'com.android.support.constraint:constraint-layout:1.0.2'
  compile 'com.android.support:appcompat-v7:25.2.0'
  compile 'com.android.support:support-v4:25.2.0'
  compile 'com.android.support:cardview-v7:25.2.0'
  compile 'com.android.support:recyclerview-v7:25.2.0'
  
  compile 'com.google.android.gms:play-services-gcm:11.0.2'
  compile 'com.google.android.gms:play-services-maps:11.0.2'
  //compile 'com.google.android.gms:play-services-analytics:11.0.1'
  
  compile 'org.apache.httpcomponents:httpclient:4.1'
  compile 'org.apache.httpcomponents:httpmime:4.1'
  
  compile 'com.joshdholtz.sentry:sentry-android:1.5.0'
  compile 'com.borax12.materialdaterangepicker:library:1.6'
  compile 'com.github.PhilJay:MPAndroidChart:v2.2.5'
  compile 'com.squareup.picasso:picasso:2.5.2'
  compile 'com.cloudinary:cloudinary-core:1.2.2'
  compile 'com.cloudinary:cloudinary-android:1.2.2'
  compile 'com.loopj.android:android-async-http:1.4.5'
  }
   apply plugin: 'com.google.gms.google-services'
  </code></pre>
  <p>And the second one:</p>
  <pre><code> buildscript {
  repositories {
      jcenter()
      maven { url &quot;https://jitpack.io&quot; }
  }
   dependencies {
      classpath 'com.android.tools.build:gradle:2.3.1'
      classpath 'com.google.gms:google-services:3.1.0'
  }
  }
  
  allprojects {
  repositories {
      jcenter()
      maven { url &quot;https://jitpack.io&quot; }
  }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/o0lJV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/o0lJV.png" alt="" /></a></p>
  <p><a href="https://i.stack.imgur.com/Sk5ir.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Sk5ir.png" alt="" /></a></p>