title: Gradle sync fails: com.google.android.gms:play-services-basement and com.google.firebase:firebase-common
body: <p>I am trying to include firebase to my android project as described in the official firebase documenation. The app is very basic and uses Google's vision APIs.</p>
  
  <p>Error that I'm getting:</p>
  
  <blockquote>
    <p>Gradle sync failed: Failed to notify dependency resolution listener.
                        The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[11.0.4,11.0.4], [15.0.1,15.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.</p>
  </blockquote>
  
  <p>I've already tried a few solutions from similar questions posted on the site which didn't work for me. More importantly, I'd like to understand the root cause, rather than blindly tinkering with versions.</p>
  
  <p>Below are my gradle files:</p>
  
  <p><strong>Module level</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  /* ... */    
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:2.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.google.android.gms:play-services:11.0.4'
      implementation 'com.google.firebase:firebase-core:16.0.1'
  }
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p><strong>Project level</strong></p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.2.1'
          classpath 'com.google.gms:google-services:4.0.1'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>Running <code>./gradlew app:dependencies</code> gives:</p>
  
  <blockquote>
    <p>Failed to notify dependency resolution listener.</p>
    
    <blockquote>
      <p>The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[11.0.4,11.0.4], [15.0.1,15.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.</p>
      
      <p>The library com.google.firebase:firebase-common is being requested by various other libraries at [[11.0.4,11.0.4]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.</p>
    </blockquote>
  </blockquote>