gpt4 book ai didi

Android 构建不起作用(在模块中发现重复的类 com.google.android.gms.internal.measurement.zzbt)

转载 作者:行者123 更新时间:2023-12-04 02:29:29 38 4
gpt4 key购买 nike

直到一周前它运行良好,但本周构建不起作用,我收到以下错误。
我尝试了以下,但我还没有解决它。
任何小事都可以,所以如果有人知道任何提示或解决方案,请告诉我。
■我尝试了什么

  • 降级类路径(“com.google.gms: google-services: 4.3.3”)
  • 指定 com.google.android.gms 的版本:play-services-measurement-sdk-api 和 com.google.android.gms:play-services-measurement
  • Gradle版本升级、降级

  • ■开发环境
    react :16.9.0
    react 原生:0.61.5
    安卓 Gradle :4.0.0
    Firebase(google-services):4.3.4

    > Task :app:checkDebugDuplicateClasses FAILED

    > Transform artifact play-services-measurement.aar (com.google.android.gms:play-services-measurement:17.4.4) with DexingWithClasspathTransform

    > Transform artifact play-services-measurement-impl.aar (com.google.android.gms:play-services-measurement-impl:17.4.4) with DexingWithClasspathTransform
    ReactNativeFirebase WARNING: NPM package '@react-native-firebase/auth' depends on '@react-native-firebase/app' v8.3.1 but found v8.4.0, this might cause build issues or runtime crashes.
    501 actionable tasks: 7 executed, 494 up-to-date
    D8: Type com.google.android.gms.internal.measurement.zzig is referenced as an interface from `com.google.android.gms.internal.measurement.zzby`.
    D8: Interface `com.google.android.gms.measurement.internal.zzhd(classpath class)` used as super class of `com.google.android.gms.measurement.AppMeasurement$UserProperty`.

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':app:checkDebugDuplicateClasses'.
    > 1 exception was raised by workers:
    java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.measurement.zzbt found in modules jetified-play-services-measurement-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement:17.4.4) and jetified-play-services-measurement-sdk-api-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:17.5.0)
    Duplicate class com.google.android.gms.internal.measurement.zzbu found in modules jetified-play-services-measurement-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement:17.4.4) and jetified-play-services-measurement-sdk-api-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:17.5.0)
    Duplicate class com.google.android.gms.internal.measurement.zzfw found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
    Duplicate class com.google.android.gms.internal.measurement.zzfy found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
    Duplicate class com.google.android.gms.internal.measurement.zzfz found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
    Duplicate class com.google.android.gms.internal.measurement.zzga found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
    Duplicate class com.google.android.gms.internal.measurement.zzgb found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
    Duplicate class com.google.android.gms.measurement.internal.zzgz found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)
    Duplicate class com.google.android.gms.measurement.internal.zzik found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.4-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.4)

    Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

    最佳答案

    我遇到了同样的问题...如果您使用的是 firebase 依赖项并且您使用的是 Material list (bom),则可能是您没有更新它,因为 Android Studio 不会提示您这样做。现在最新的 bom 是 26.1.1(但检查 documentation ),所以它应该是这样的:implementation platform('com.google.firebase:firebase-bom:26.1.1') .

    关于Android 构建不起作用(在模块中发现重复的类 com.google.android.gms.internal.measurement.zzbt),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65247768/

    38 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com