【问题标题】:React Native Build App build error type a.a is defined multiple timesReact Native Build App 构建错误类型 a.a 定义多次
【发布时间】:2023-02-16 18:48:46
【问题描述】:

我正在做一个反应本机项目,我必须在其中集成缩放视频 sdk。首先,我在使用 zoom 1.2.0 版,然后我不得不将它升级到 1.5.3 版。升级后,应用程序构建并在调试模式下正常工作,但当我尝试生成应用程序或执行捆绑发布时,它返回此错误。

`* 出了什么问题: 任务 ':app:mergeDexRelease' 执行失败。

执行 com.android.build.gradle.internal.tasks.DexMergingTaskDelegate 时发生故障 执行工作项时失败 > 执行 com.android.build.gradle.internal.tasks.DexMergingWorkAction 时发生故障 > com.android.builder.dexing.DexArchiveMergerException:合并 dex 档案时出错: a.a 类型定义了多次:/Users/macbookpro/Desktop/healing-center-mobile/android/app/build/intermediates/external_libs_dex/release/mergeExtDexRelease/classes.dex, /Users/macbookpro/Desktop/healing-center-mobile /android/mobilertc/build/.transforms/e16cb3969562dbd5409148a5e09af52c/transformed/jetified-mobilertc-runtime/classes.dex 在https://developer.android.com/studio/build/dependencies#duplicate_classes 了解如何解决问题。

  • 尝试:

使用 --stacktrace 选项运行以获取堆栈跟踪。 使用 --info 或 --debug 选项运行以获得更多日志输出。 使用 --scan 运行以获得完整的见解。`

我搜索它,那里有很多解决方案,比如添加 dependenciesInfo { // Disables dependency metadata when building APKs. includeInApk = false // Disables dependency metadata when building Android App Bundles. includeInBundle = false } 在 app/build.gradle 中

或添加multiDexEnabled trueimplementation 'androidx.multidex:multidex:2.0.1'

或将排除模型添加到 app/build.gradle implementation (project(':mobilertc')) { exclude module: 'duplicated module' } 中的项目

或者通过添加到 build.gradle implementation("com.google.guava:guava:24.0-jre")

我还尝试使 android 的缓存无效,删除节点模块并重新安装。 但总是同样的错误。 那么有人可以帮忙吗?

【问题讨论】:

    标签: android react-native mobile apk zoom-sdk


    【解决方案1】:

    我遇到了同样的问题。

    在 android/app/build.gradle 中

    删除此行:

    实施 'us.zoom.videosdk:ZoomVideoSDK:1.5.3'

    再次构建 => 解决了这个问题

    希望有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-12-03
      • 2017-11-13
      • 2017-06-26
      • 2018-11-05
      • 2022-11-14
      • 2018-11-18
      • 1970-01-01
      相关资源
      最近更新 更多