0

I didnt understand why i am getting this error when im trying to update location

mLocationrequest.setInterval(1000);
                        ^
  class file for com.google.android.gms.common.internal.safeparcel.zza not found

These are the dependencies

dependencies {

    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'com.google.firebase:firebase-auth:21.0.1'
    implementation 'com.google.firebase:firebase-database:20.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation platform('com.google.firebase:firebase-bom:28.1.0')
    implementation 'com.google.firebase:firebase-analytics'
    compile  'com.google.android.gms:play-services-location:11.0.2'

}

And this is the code

@Override
    public void onConnected(@Nullable Bundle bundle) {
        mLocationrequest = new LocationRequest();
        mLocationrequest.setInterval(1000);
        mLocationrequest.setFastestInterval(1000);
        mLocationrequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) !=
                PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){return;
        }
  • Does this answer your question? [Error:(230, 25) error: cannot access zza class file for com.google.android.gms.common.internal.safeparcel.zza not found](https://stackoverflow.com/questions/48075051/error230-25-error-cannot-access-zza-class-file-for-com-google-android-gms-c) – javdromero Jun 18 '21 at 15:36
  • This looks like a mismatch in the versions of your dependencies. I would specifically try changing the versions on play-services-location and anything firebase related. You can also try changing the compileSdkVersion. Another similar question can be found here: https://stackoverflow.com/questions/53565663/error280-61-error-cannot-access-zza-class-file-for-com-google-android-gms-c – Shawn Jun 18 '21 at 15:41

0 Answers0