首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何解决此错误:在模块中找到重复类com.google.android.gms.internal.vision.zzw

如何解决此错误:在模块中找到重复类com.google.android.gms.internal.vision.zzw
EN

Stack Overflow用户
提问于 2020-10-20 10:14:26
回答 3查看 3.2K关注 0票数 1

jetified-play-services-vision-20.0.0-runtime.jar (com.google.android.gms:play-services-vision:20.0.0)和jetified-play-services-vision-common-19.1.0-runtime.jar模块中的重复类com.google.android.gms.internal.vision.zzv (com.google.android.gms:play ** )

代码语言:javascript
复制
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
googleServices {disableVersionCheck = true}

android {
    compileSdkVersion 29

    defaultConfig {
        applicationId "com.greenhelix.pear"
        minSdkVersion 23
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
    implementation 'com.google.firebase:firebase-auth:19.4.0'
    implementation 'com.google.firebase:firebase-ml-vision:24.0.3'
//    implementation 'com.google.firebase:firebase-ml-vision:24.1.0'
//    implementation 'com.google.firebase:firebase-ml-vision-barcode-model:16.1.1'
    implementation 'com.google.firebase:firebase-core:17.5.1'
    implementation platform('com.google.firebase:firebase-bom:25.12.0')
    implementation 'com.google.firebase:firebase-analytics:17.6.0'
    implementation 'com.google.android.gms:play-services-auth:18.1.0'
    implementation 'com.google.android.gms:play-services-vision:20.1.2'

    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.recyclerview:recyclerview-selection:1.1.0-rc03'

    testImplementation 'junit:junit:4.13.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"


}
repositories {
    mavenCentral()
}
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2020-10-26 19:24:40

这是你的Google Play服务和Jetify Play服务之间100%的冲突。尝试-清洁>构建

票数 1
EN

Stack Overflow用户

发布于 2020-11-18 01:46:20

很不幸的是,干净的构建对我来说没有用。将‘com.google.fire:firebase-ml’从'implementation‘改为'compileOnly’似乎已经解决了眼前的问题。

代码语言:javascript
复制
 compileOnly 'com.google.firebase:firebase-ml-vision' 
票数 4
EN

Stack Overflow用户

发布于 2022-09-28 12:43:35

更新firebase-bom的依赖项(它不自动建议更新)

implementation platform('com.google.firebase:firebase-bom:30.5.0')

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64443018

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档