1:问题描述
我首先集成了即时通信im,再集成实时音视频,在手机上运行正常,功能都能使用,但打包时出现如下提示:
Execution failed for task ':app:mergeDexRelease'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingTaskDelegate
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.tasks.DexMergingWorkAction
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Type com.tencent.qcloud.tuicore.BuildConfig is defined multiple times: D:\work\androidCode\android-freeper-socialize\TUIKit\TUICore\tuicore\build\.transforms\a26965b4a56315b113eb12c8e3093d1f\transformed\release\com\tencent\qcloud\tuicore\BuildConfig.dex, D:\work\androidCode\android-freeper-socialize\app\build\intermediates\external_libs_dex\release\mergeExtDexRelease\classes.dex
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
通过网上搜索,说该错误是com.tencent.qcloud.tuicore下清单文件的包名重复
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tencent.qcloud.tuicore">
我全局搜索后,确定com.tencent.qcloud.tuicore包名是唯一的,没有重复,所以请教一下,这个问题该如何解决?
另外我在我的app下,build.gradle引入如下:
api project(':tuiconversation')
api project(':tuichat')
api project(':tuiliveroom')//如果不引入该模块,能正常打包。
相似问题