Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

android - Error: cannot access zzbgl

I am developing an application and I am getting the following error:

error: cannot access zzbgl
class file for com.google.android.gms.internal.zzbgl not found

I know there's a question here in StackOverflow with the same error that I'm getting posted 4 days ago but the answer did not help in my case. (I am talking about this one)

The error appeared just right after setting Firebase Analytics in my project.

My build.gradle (Module: app) file is this:

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 '27.0.3'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId 'com.geoactio.montferri'
        minSdkVersion 14
        targetSdkVersion 26
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    dependencies {
         implementation 'com.android.support:multidex:1.0.3'
         implementation 'com.android.support:appcompat-v7:26.1.0'
//        compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.0'
        implementation 'com.google.android.gms:play-services:12.0.1'
        //implementation 'com.google.android.gms:play-services-maps:15.0.1'
        //implementation 'com.google.android.gms:play-services-location:15.0.1'
        implementation "com.google.android.gms:play-services-base:15.0.1"
        implementation 'com.navercorp.pulltorefresh:library:3.2.3@aar'

    }
    productFlavors {
    }
    lintOptions {
        disable 'MissingTranslation'
    }

    dexOptions {
        javaMaxHeapSize "4g"
        preDexLibraries = false
    }
}
repositories {
    maven { url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases' }
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-messaging:17.1.0'

    implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
    transitive = true;
    }
}

apply plugin: 'com.google.gms.google-services'

My build.gradle (Project: myPorojectName) file is this:

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        classpath 'com.google.gms:google-services:4.1.0'
    }
}

allprojects {

    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

And clicking in the error leads me here, just after new MarkerOptions():

mapView.addMarker(new MarkerOptions().position(new LatLng(puntomarker.getLatitud(), puntomarker.getLongitud()))
                    .zIndex(0.5f)
                    .anchor(0.5f, 0.5f)
                    .title(puntomarker.getId() + "")
                    .snippet(puntomarker.getNombre())
                    .icon(BitmapDescriptorFactory.fromBitmap(((BitmapDrawable) marker).getBitmap())));

(being mapView a GoogleMap instance).

I hope someone can see the error and solve this, thank you so much in advance. If you need any more information in order to solve this, please let me know.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...