tatan
tatan
  • 发布:2025-05-30 15:02
  • 更新:2025-05-30 17:07
  • 阅读:62

App引入云插件打包失败

分类:uni-app

不知道为啥突然打包失败了,大佬们帮忙看下
用的云插件有极光推动和华为扫码
附件有全部的报错信息

Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkReleaseDuplicateClasses'.

    A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
    Duplicate class com.huawei.agconnect.AGConnectInstance found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.annotation.Singleton found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.config.AGConnectServicesConfig found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.config.LazyInputStream found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.core.BuildConfig found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.core.Service found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.core.Service$1 found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.core.Service$Builder found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.core.ServiceDiscovery found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)
    Duplicate class com.huawei.agconnect.core.ServiceRegistrar found in modules jetified-agconnect-core-1.4.0.300-runtime (com.huawei.agconnect:agconnect-core:1.4.0.300) and jetified-agconnect-core-1.7.3.302-runtime (agconnect-core-1.7.3.302.aar)

2025-05-30 15:02 负责人:无 分享
已邀请:
DCloud_App_Array

DCloud_App_Array

原生插件使用的“com.huawei.agconnect:agconnect-core”冲突了,只是华为基础服务库​,是不是使用uni-push的华为离线推送?
都用了什么原生插件?如果是本地插件需要你自行排查,如果是云端插件,把列表发出来我们确认下是哪个插件使用

  • tatan (作者)

    离线推送厂商通道用到的是华为


    云插件使用的如下:

    1,应用闪退、崩溃异常日志捕获插件(可对接网络上报) Ba-Crash

    https://ext.dcloud.net.cn/plugin?id=17300

    2,极光推送 JPush 官方 SDK

    https://ext.dcloud.net.cn/plugin?id=4035

    3,华为ScanKit统一扫码插件,支持连续扫描模式,安卓-IOS双端

    https://ext.dcloud.net.cn/plugin?id=2683

    4,【限时五折】相机自定义 拍照界面任意定制,支持抓帧 支持录像 支持取色

    https://ext.dcloud.net.cn/plugin?id=4531

    2025-05-30 17:56

  • DCloud_App_Array

    回复 tatan: 可能是“极光推送”与“华为ScanKit统一扫码”两个插件有冲突,可以尝试去掉其中一个试下。

    2025-06-03 15:52

  • tatan (作者)

    回复 DCloud_App_Array: 去掉华为扫码就可以打包,但是两个插件我们都需要,是不能一起用了吗?

    2025-06-03 16:35

  • DCloud_App_Array

    回复 tatan: 联系插件作者,更新使用仓储依赖com.huawei.agconnect:agconnect-core,避免直接在插件中使用aar依赖。

    2025-06-03 20:37

要回复问题请先登录注册