title: gradle settings: com.google.android.gms.internal.zzbgl not found
body: <p>I have read similar Q/A <a href="https://stackoverflow.com/questions/50872053/i-get-an-error-class-file-for-com-google-android-gms-internal-zzbgl-not-found">here</a> and <a href="https://stackoverflow.com/questions/50853383/class-file-for-com-google-android-gms-internal-zzbgl-not-found">here</a> about this problem. All solution was to use latest plugins. The question is outdated and I need new configuration using latest versions again. I have checked the plugins compatibility and that all version are up to date when I post this question, but no success yet:</p>
  
  <blockquote>
    <p>error: cannot access zzbgl class file for
    com.google.android.gms.internal.zzbgl not found</p>
  </blockquote>
  
  <p><strong>Project Gradle:</strong></p>
  
  <pre><code>buildscript {
  
      repositories {
          google()
          mavenCentral()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.1.3'
          classpath 'com.google.gms:google-services:4.0.1'
      }
  }
  
  allprojects {
      repositories {
          google()
          mavenCentral()
          jcenter()
          maven {
              url "https://maven.google.com"
          }
      }
  }
  </code></pre>
  
  <p><strong>app Gradle:</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      buildToolsVersion "28.0.1"
  
      defaultConfig {
          applicationId "com.example.app"
          minSdkVersion 14
          targetSdkVersion 28
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
  }
  
  dependencies {
      implementation 'com.google.firebase:firebase-core:16.0.1'
      implementation 'com.google.firebase:firebase-messaging:17.1.0'
      implementation 'com.google.android.gms:play-services:12.0.1'
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>I get error when I try to import the followings:</p>
  
  <pre><code>import com.google.android.gms.common.ConnectionResult;
  import com.google.android.gms.common.api.GoogleApiClient;
  import com.google.android.gms.location.LocationListener;
  import com.google.android.gms.location.LocationRequest;
  import com.google.android.gms.location.LocationServices;
  </code></pre>