title: How to solve gradle googleplayservices version error in flutter?
body: <p>I am getting a google play services error in android studio and i am using flutter. I have tried various solutions but nothing seems to work. </p>
  
  <p>I have tried to change the version of googleplayservices but its the same.</p>
  
  <pre><code>Failed to capture fingerprint of input files for task 
  ':app:checkDebugClasspath' property 'compileClasspath' during up-to-date 
  check.
  &gt; In project 'app' a resolved Google Play services library dependency 
  depends on another at an exact version (e.g. "[15.0.
  1]", but isn't being resolved to that version. Behavior exhibited by the 
  library will be unknown.
  
  Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -&gt; 
  com.google.android.gms:play-services-basement@[
  15.0.1], but play-services-basement version was 16.0.1.
  
  The following dependencies are project dependencies that are direct or have 
  transitive dependencies that lead to the art
  ifact with the issue.
   -- Project 'app' depends on project 'firebase_auth' which depends onto 
  com.google.firebase:firebase-auth@16.0.2
   -- Project 'app' depends on project 'firebase_core' which depends onto 
  com.google.firebase:firebase-core@16.0.4
   -- Project 'app' depends on project 'cloud_firestore' which depends onto 
  com.google.firebase:firebase-firestore@17.1.1
    -- Project 'app' depends on project 'firebase_storage' which depends onto 
  com.google.firebase:firebase-storage@15.+
   -- Project 'app' depends on project 'google_sign_in' which depends onto 
  com.google.android.gms:play-services-auth@16.0.1
  
   For extended debugging info execute Gradle from the command line with 
  ./gradlew --info :app:assembleDebug to see the dep
   endency paths to the artifact. This error message came from the google- 
  services Gradle plugin, report issues at https://
    github.com/google/play-services-plugins and disable by adding 
  "googleServices { disableVersionCheck = false }" to your b
    uild.gradle file.
  </code></pre>
  
  <p>build.gradle(app)</p>
  
  <pre><code> def localProperties = new Properties()
  def localPropertiesFile = rootProject.file('local.properties')
    if (localPropertiesFile.exists()) {
  localPropertiesFile.withReader('UTF-8') { reader -&gt;
      localProperties.load(reader)
  }
  }
  
  def flutterRoot = localProperties.getProperty('flutter.sdk')
  if (flutterRoot == null) {
  throw new GradleException("Flutter SDK not found. Define location with 
  flutter.sdk in the local.properties file.")
  }
  
  def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
   if (flutterVersionCode == null) {
  flutterVersionCode = '1'
  }
  
  def flutterVersionName = localProperties.getProperty('flutter.versionName')
  if (flutterVersionName == null) {
  flutterVersionName = '1.0'
  }
  
  apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  
  android {
  compileSdkVersion 27
  
  
  sourceSets {
      main.java.srcDirs += 'src/main/kotlin'
  }
  
  lintOptions {
      disable 'InvalidPackage'
  }
  
  defaultConfig {
      // TODO: Specify your own unique Application ID 
  (https://developer.android.com/studio/build/application-id.html).
      applicationId "com.example.news"
      minSdkVersion 16
      multiDexEnabled true
      targetSdkVersion 27
      versionCode flutterVersionCode.toInteger()
      versionName flutterVersionName
      testInstrumentationRunner 
  "android.support.test.runner.AndroidJUnitRunner"
  }
  
  buildTypes {
      release {
          // TODO: Add your own signing config for the release build.
          // Signing with the debug keys for now, so `flutter run --release` 
  works.
          signingConfig signingConfigs.debug
      }
  }
  }
  
  flutter {
  source '../..'
    }
  
  dependencies {
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  testImplementation 'junit:junit:4.12'
  androidTestImplementation 'com.android.support.test:runner:1.0.2'
  androidTestImplementation 'com.android.support.test.espresso:espresso- 
  core:3.0.2'
  implementation 'com.android.support:multidex:1.0.3'
  }
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>build.gradle/project</p>
  
  <pre><code>buildscript {
  ext.kotlin_version = '1.2.71'
  repositories {
      google()
      jcenter()
  }
  
  dependencies {
      classpath 'com.android.tools.build:gradle:3.2.1'
      classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
      classpath 'com.google.gms:google-services:4.2.0'
  }
  }
  
  allprojects {
  repositories {
      google()
      jcenter()
  }
  ext {
      global_version_firebase = '16.0.+'
  }
  }
  
  rootProject.buildDir = '../build'
  subprojects {
  project.buildDir = "${rootProject.buildDir}/${project.name}"
  }
  subprojects {
  project.evaluationDependsOn(':app')
  }
  
  task clean(type: Delete) {
  delete rootProject.buildDir
  }
  </code></pre>
  
  <p>pubspec.yaml</p>
  
  <pre><code>name: news
  description: 'A new Flutter application.'
  version: 1.0.0+1
  environment:
  sdk: '&gt;=2.0.0-dev.68.0 &lt;3.0.0'
  dependencies:
  flutter:
      sdk: flutter
  cupertino_icons: ^0.1.2
  http: null
  share: null
  connectivity:
  url_launcher:
  cloud_firestore:
  rxdart:
  firebase_auth: ^0.5.19
  google_sign_in:
  date_format:
  intl:
  firebase_storage: ^0.3.7
  image_picker:
  
  dev_dependencies:
  flutter_test:
      sdk: flutter
  flutter:
  uses-material-design: true
  assets:
      - images/logo.jpg
      - images/fb.jpg
      - images/back.jpg
      - images/google.jpg
  </code></pre>
  
  <p>please help me to solve this error.
  Thank you</p>