com.google.android.gms.common.internal.zzf类型引用为>;接口来自

com.google.android.gms.common.internal.zzf类型引用为>;接口来自,android,firebase,android-studio,Android,Firebase,Android Studio,我将我的android应用程序迁移到AndroidX(从菜单重构->迁移到AndroidX),现在当我运行应用程序时,它工作正常,但是当我尝试生成签名的.apk文件时,我得到了如下错误 Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzcdb. Type com.google.android.gms.commo

我将我的android应用程序迁移到AndroidX(从菜单重构->迁移到AndroidX),现在当我运行应用程序时,它工作正常,但是当我尝试生成签名的.apk文件时,我得到了如下错误


Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzcdb.

Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzii.

Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzcms.

这是我在应用程序上使用的依赖项列表

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:29.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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.android.support:support-annotations:29.0.0')
    implementation "com.android.support:design:29.0.0"
    implementation 'com.android.support:support-v4:29.0.0'
    implementation "com.google.android.material:material:1.0.0"
    implementation 'com.google.android:flexbox:0.3.2'

    implementation 'com.android.support:multidex:1.0.3'

    implementation 'me.relex:circleindicator:1.2.2@aar' //For view pager circle

    implementation 'com.jakewharton:butterknife:10.2.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'

    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.ybq:Android-SpinKit:1.1.0'

    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.squareup.okhttp3:okhttp:4.2.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
    implementation('com.squareup.retrofit2:retrofit:2.6.2') {
        exclude module: 'okhttp'
    }

    implementation project(":photoview")

    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

    implementation 'com.google.android:flexbox:0.3.2'
    implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
        transitive = true;
    }

}

这可能是问题的原因:

implementation 'com.google.android.gms:play-services:12.0.1'
事实上,这种依赖性已经过时了。实际上,您应该完全删除它,让firebase消息传递只需要它所需要的

如果您需要使用任何特定的播放服务库,您应该使用以下列出的一个新的、更细粒度的库:


将应用程序中的所有依赖项更新为可用的最新版本。@DougStevenson让我来看看try@DougStevenson现在我得到“错误:所有firebase库必须高于或低于14.0.0打开文件”但是我在我的项目上使用了最新版本的firebase库,通过执行gradle任务
依赖项
可以得到一个依赖项树。可能是其他库正在导入较旧的firebase版本。(同时检查您的libs文件夹中是否有可能产生冲突的任何其他库)请编辑问题以显示build.gradle中的所有依赖项。您可能仍然没有将某些内容更新到最新版本。