Android构建错误-错误:无法访问com.google.android.gms.internal.zzbgl的zzbgl类文件

时间:2018-12-25 11:11:29

标签: android android-studio

我正在开发一个Android应用程序,并且在构建该应用程序以生成用于发布的签名文件时,出现以下错误。

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

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


  `apply plugin: 'com.android.application'

   buildscript {
        repositories {
      maven { url 'https://maven.fabric.io/public' }
    }
 }

android {
compileSdkVersion 27
defaultConfig {
    applicationId 'com.brainoidtech.dbm'
    minSdkVersion 19
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    manifestPlaceholders = [onesignal_app_id: "a515bddd-f7c8-48c9-a079-372706858f8d", onesignal_google_project_number: "REMOTE"]
}
repositories {
    mavenCentral()
    mavenLocal()  // For google-play-services is not on Maven Central.

    //for vimeo video player
    maven { url "https://jitpack.io" }
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt')
        proguardFile 'proguard-google-api-client.txt'
        proguardFile getDefaultProguardFile('proguard-android.txt')
    }
}
aaptOptions {
    cruncherEnabled = false
}
productFlavors {
}
lintOptions {
    abortOnError false
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/INDEX.LIST'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/ASL2.0'
   }
 }

dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:preference-v7:27.1.1'
implementation 'com.android.support:preference-v14:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'

implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.bogdwellers:pinchtozoom:0.1'
implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation 'com.crystal:crystalrangeseekbar:1.1.1'
implementation 'com.github.apl-devs:appintro:v4.2.3'
implementation 'hyogeun.github.com.colorratingbar:ColorRatingBar:1.0.1'
implementation 'com.onesignal:OneSignal:3.10.1'
implementation 'com.facebook.android:facebook-android-sdk:4.39.0'

implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-ads:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'

implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'


//Multidex dependency
implementation 'com.android.support:multidex:1.0.3'
//R- rules
implementation 'org.dmfs:rfc5545-datetime:0.2.4'

//Rounded image view
implementation 'com.makeramen:roundedimageview:2.2.1'

implementation 'com.google.apis:google-api-services-calendar:v3-rev260-1.23.0' exclude module: 'httpclient'
implementation 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient'
implementation 'com.google.http-client:google-http-client-gson:1.23.0' exclude module: 'httpclient'

implementation 'com.google.api-client:google-api-client:1.25.0'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'

//Exo Player
implementation 'com.google.android.exoplayer:exoplayer:2.9.2'
//Youtube video api
implementation project(':YouTubeAndroidPlayerApi')
//Vimeo video player
implementation 'com.github.ed-george:AndroidVimeoExtractor:1.1.2'
//Pdf reader
implementation 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'
implementation 'com.mindorks.android:prdownloader:0.5.0'
}

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

我的 build.gradle(项目:myPorojectName)文件是:

buildscript {

repositories {
    google()
    jcenter()
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    classpath 'com.google.gms:google-services:4.2.0'
   }
}

allprojects {
repositories {
    google()
    jcenter()
    mavenCentral()
    maven { url "https://jitpack.io"}
    }
 }

 task clean(type: Delete) {
delete rootProject.buildDir
}

我尝试过发布在Internet或stackoverflow上的解决方案,但是这些解决方案似乎对我不起作用,或者我做错了什么?

任何帮助将不胜感激。谢谢!

0 个答案:

没有答案