title: Android studio error - missing class file
body: <p>I'm working on an app and a while ago it was still working and it was building just fine, but after a few minutes of coding, I tried to build again then an error showed up:</p>
  
  <blockquote>
    <p>"error: cannot access zzbck class file for com.google.android.gms.internal.zzbck not found"</p>
  </blockquote>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>package com.lrtapp.ardentmap;
  
  import android.Manifest;
  import android.content.pm.PackageManager;
  import android.location.Address;
  import android.location.Geocoder;
  import android.location.Location;
  import android.media.Image;
  import android.os.Bundle;
  import android.support.annotation.NonNull;
  import android.support.annotation.Nullable;
  import android.support.v4.app.ActivityCompat;
  import android.support.v4.content.ContextCompat;
  import android.support.v7.app.AppCompatActivity;
  import android.util.Log;
  import android.view.KeyEvent;
  import android.view.View;
  import android.view.WindowManager;
  import android.view.inputmethod.EditorInfo;
  import android.widget.EditText;
  import android.widget.ImageView;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import com.google.android.gms.gcm.Task;
  import com.google.android.gms.location.FusedLocationProviderClient;
  import com.google.android.gms.location.LocationServices;
  import com.google.android.gms.maps.CameraUpdate;
  import com.google.android.gms.maps.CameraUpdateFactory;
  import com.google.android.gms.maps.GoogleMap;
  import com.google.android.gms.maps.OnMapReadyCallback;
  import com.google.android.gms.maps.SupportMapFragment;
  import com.google.android.gms.maps.model.LatLng;
  import com.google.android.gms.maps.model.MarkerOptions;
  import com.google.android.gms.tasks.OnCompleteListener;
  
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.Map;
  
  public class MapActivity extends AppCompatActivity implements OnMapReadyCallback {
  
      @Override
      public void onMapReady(GoogleMap googleMap) {
          Toast.makeText(this, "map is ready", Toast.LENGTH_SHORT).show();
          Log.d(TAG, "onMapReady: map is ready");
          mMap = googleMap;
  
          if (mLocationPermissionGranted) {
              getDeviceLocation();
  
              if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
                      != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this,
                      Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
  
                  return;
              }
              mMap.setMyLocationEnabled(true);
              mMap.getUiSettings().setMyLocationButtonEnabled(false);
  
              init();
          }
      }
  
      private static final String TAG = "MapActivity";
  
      private static final String FINE_LOCATION = Manifest.permission.ACCESS_FINE_LOCATION;
      private static final String COURSE_LOCATION = Manifest.permission.ACCESS_COARSE_LOCATION;
      private static final int LOCATION_PERMISSION_REQUEST_CODE = 1234;
      private static final float DEFAULT_ZOOM = 15f;
  
      //widgets
      private EditText mSearchText;
      private ImageView mGps;
  
      //vars
  
      private boolean mLocationPermissionGranted = false;
      private GoogleMap mMap;
      private FusedLocationProviderClient mFusedLocationProviderClient;
  
      @Override
      protected void onCreate(@Nullable Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_map);
          mSearchText = (EditText) findViewById(R.id.input_search);
          mGps = (ImageView) findViewById(R.id.ic_gps);
  
          getLocationPermission();
  
      }
  
      private void init(){
          Log.d(TAG, "init: Initializing");
  
          mSearchText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
              @Override
              public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
                  if (actionId == EditorInfo.IME_ACTION_SEARCH
                          || actionId == EditorInfo.IME_ACTION_DONE
                          ||  keyEvent.getAction() == keyEvent.ACTION_DOWN
                          || keyEvent.getAction() == keyEvent.KEYCODE_ENTER){
  
                      //execute method for searching
                      geoLocate();
  
                  }
                  return false;
              }
          });
  
          mGps.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Log.d(TAG, "onClick: clicked gps icon");
                  getDeviceLocation();
  
              }
          });
  
          hideSoftKeyboard();
      }
  
      private void geoLocate(){
          Log.d(TAG, "geoLocate: geolocating");
  
          String searchString = mSearchText.getText().toString();
  
          Geocoder geocoder = new Geocoder(MapActivity.this);
          List&lt;Address&gt; list = new ArrayList&lt;&gt;();
          try{
              list = geocoder.getFromLocationName(searchString, 1);
          }catch(IOException e){
              Log.e(TAG, "geoLocate: IOException" + e.getMessage());
          }
          if(list.size() &gt; 0){
              Address address = list.get(0);
  
              Log.d(TAG, "GeoLocate: found a Location: " +address.toString());
  
             // Toast.makeText(this, address.toString(), Toast.LENGTH_SHORT()).show();
  
              moveCamera(new LatLng(address.getLatitude(), address.getLongitude()), DEFAULT_ZOOM,
                      address.getAddressLine(0));
          }
      }
  
      private void getDeviceLocation(){
          Log.d(TAG, "getDeviceLocation: getting the device's current location.");
  
          mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);
  
          try {
              if (mLocationPermissionGranted){
  
                  final com.google.android.gms.tasks.Task location = mFusedLocationProviderClient.getLastLocation();
                  location.addOnCompleteListener(new OnCompleteListener() {
                      @Override
                      public void onComplete(@NonNull com.google.android.gms.tasks.Task task) {
                          if(task.isSuccessful()){
                              Log.d(TAG, "Found Location");
                              Location currentLocation = (Location) task.getResult();
  
                                  moveCamera(new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude()),
                                          DEFAULT_ZOOM,
                                          "My Location");
  
                          }else{
                              Log.d(TAG, "onComplete: current Location is null");
                              Toast.makeText(MapActivity.this, "unable to get current location", Toast.LENGTH_SHORT).show();
                          }
                      }
                  });
  
              }
          }catch (SecurityException e){
              Log.e(TAG, "getDeviceLocation: SecurityException: " + e.getMessage());
          }
      }
  
      private void moveCamera(LatLng latLng, float zoom, String title){
          Log.d(TAG, "moving the camera to: lat: " + latLng.latitude + ", lng: " +latLng.longitude);
          mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,zoom));
  
          if(!title.equals("My Location")){
              MarkerOptions options = new MarkerOptions()
                      .position(latLng)
                      .title(title);
  
              mMap.addMarker(options);
          }
          hideSoftKeyboard();
  
      }
  
      private void initMap(){
          Log.d(TAG, "initMap: initializing map");
          SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
  
          mapFragment.getMapAsync(MapActivity.this);
      }
  
      private void getLocationPermission(){
          Log.d(TAG, "getLocationPermission: getting location permissions");
          String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};
  
          if(ContextCompat.checkSelfPermission(this.getApplicationContext(), FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){
  
          if(ContextCompat.checkSelfPermission(this.getApplicationContext(), COURSE_LOCATION) == PackageManager.PERMISSION_GRANTED){
              mLocationPermissionGranted = true;
              initMap();
  
          }else{
              ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);
          }
  
          }else{
              ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);
          }
      }
  
      @Override
      public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
          Log.d(TAG, "onRequestPermissionsResult: called.");
          mLocationPermissionGranted = false;
  
          switch (requestCode){
              case LOCATION_PERMISSION_REQUEST_CODE:{
                  if(grantResults.length &gt; 0){
                      for(int i = 0; i &lt; grantResults.length; i++){
                          if(grantResults[i] != PackageManager.PERMISSION_GRANTED){
                              mLocationPermissionGranted = false;
                              Log.d(TAG, "onRequestPermissionsResult: permission failed.");
                              return;
                          }
                      }
  
                      mLocationPermissionGranted = true;
                      Log.d(TAG, "onRequestPermissionsResult: permission granted.");
                      //initializing map
                      initMap();
  
                  }
              }
          }
      }
  
      private void hideSoftKeyboard(){
          this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
      }
  
  }
  </code></pre>
  
  <p><strong>build.gradle:</strong></p>
  
  <p>Module level:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 27
      defaultConfig {
          applicationId "com.lrtapp.ardentmap"
          minSdkVersion 16
          targetSdkVersion 27
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:27.1.1'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.google.firebase:firebase-messaging:11.8.0'
      testImplementation 'junit:junit:4.12'
      implementation 'com.google.firebase:firebase-core:16.0.1'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  
      implementation 'me.biubiubiu.justifytext:library:1.1'
  
      //Google Play Services
      implementation 'com.google.android.gms:play-services:11.4.0'
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>Project level:</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.1.2'
          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()
          maven{
              url "https://maven.google.com"
          }
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>