繁体   English   中英

错误:程序类型已存在:com.google.android.gms.internal.measurement.zzfg

[英]Error: Program type already present: com.google.android.gms.internal.measurement.zzfg

我尝试在Internet上找到解决方案,但没想到对我有用。 实施Firebase分析后,我的程序显示此错误。 错误:程序类型已存在:com.google.android.gms.internal.measurement.zzfg

    buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        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()
    }
}

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

build.gradle(模块:应用)

   dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.android.gms:play-services-ads:17.1.1'
    implementation 'com.google.firebase:firebase-database:16.0.5'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.firebase:firebase-core:16.0.6'
    implementation 'com.google.firebase:firebase-analytics:16.0.6';
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.google.firebase:firebase-config:16.1.2'
    com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
}

尝试将依赖项更新到以下最新版本

com.google.android.gms:play-services和com.google.firebase:

看起来像在这里讨论过的:

各种其他库都在请求com.google.android.gms:play-services-measurement-base

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM