错误:找不到com.google.android.gms.internal.zzbgl的zzbgl类文件

时间:2018-10-11 07:05:16

标签: android google-maps firebase build.gradle

我正在运行我的android应用程序时出错

    implementation 'com.google.android.gms:play-services-gcm:15.0.1'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'      
    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'

    LocationRequest locationRequest = LocationRequest.create();
    locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
    locationRequest.setInterval(30 * 1000);
    locationRequest.setFastestInterval(5 * 1000);
    LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()
    .addLocationRequest(locationRequest);
    builder.setAlwaysShow(true);

2 个答案:

答案 0 :(得分:2)

implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.7'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.7'

使用此依赖关系解决zzbgl类问题

答案 1 :(得分:0)

https://firebase.google.com/docs/android/setup https://developers.google.com/android/guides/setup 请同时匹配两个版本并使用最新版本,这样可以解决错误。...快乐编码