title: Failed to resolve: play-services-tasks-license (putting google() before jcenter() doesn't work)
body: <p>Whenever I try to run my app I got the following gradle error:</p>
  
  <blockquote>
    <p>Failed to resolve: play-services-tasks-license</p>
  </blockquote>
  
  <p>According to <a href="https://stackoverflow.com/questions/50940565/failed-to-resolve-play-services-tasks">this</a> question, I have tried every possible solution, but none of them worked.</p>
  
  <p><strong>If I put google() to the first row of the dependencies, the error still appears.</strong></p>
  
  <p>Please help if you can.</p>
  
  <p><strong>My app-level build.gradle file:</strong></p>
  
  <pre><code>buildscript {
      repositories {
          maven { url 'https://maven.fabric.io/public' }
      }
  
      dependencies {
          classpath 'io.fabric.tools:gradle:1.+'
      }
  }
  apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  
  android {
      compileSdkVersion 26
      buildToolsVersion '28.0.3'
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  
      defaultConfig {
          minSdkVersion 19
          applicationId 'com.myapppackage.app'
          targetSdkVersion 26
          versionCode 77
          versionName '1.5.53'
          multiDexEnabled true
  
          vectorDrawables.useSupportLibrary = true
  
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          testInstrumentationRunner 'io.appflate.restmock.android.RESTMockTestRunner'
      }
  }
  
  
  repositories {
      maven {
          url 'https://maven.google.com/'
          name 'Google'
      }
      maven { url "https://jitpack.io" }
      maven { url 'https://maven.fabric.io/public' }
  }
  
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
  
      implementation 'com.android.support:appcompat-v7:26.0.2'
      implementation 'com.android.support:design:26.0.2'
      implementation 'com.android.support:multidex:1.0.2'
  
      implementation 'com.google.android.gms:play-services-gcm:11.8.0'
      implementation 'com.google.android.gms:play-services-location:11.8.0'
      implementation 'com.google.android.gms:play-services-maps:11.8.0'
      implementation 'com.google.android.gms:play-services-ads:11.8.0'
      implementation 'com.google.android.gms:play-services-base:11.8.0' 
  
      implementation files('libs/youtube.jar')
  
  }
  </code></pre>
  
  <p><strong>My project-level gradle file:</strong></p>
  
  <pre><code>    // Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          google()
          maven {
              url 'https://maven.google.com/'
              name 'Google'
          }
          jcenter()
  
  
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.1.4'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>