1***@qq.com
1***@qq.com
  • 发布:2024-09-26 15:48
  • 更新:2024-09-26 20:14
  • 阅读:145

制作安卓自定义基座一直提示lib/arm64-v8a/libgnustl_shared.so

分类:uni-app

FAILURE: Build failed with an exception.

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

    A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
    2 files found with path 'lib/arm64-v8a/libgnustl_shared.so' from inputs:

  • /srv/.gradle/caches/transforms-3/80fbdb81395920c68281dda7515a0ee8/transformed/jetified-DHPlayLibRetailModule-release/jni/arm64-v8a/libgnustl_shared.so

  • /srv/.gradle/caches/transforms-3/9b1c2f18552b8c637e866eda160584e2/transformed/jetified-HikCloudOpenSDK_v1.4.0_20240328/jni/arm64-v8a/libgnustl_shared.so
    If you are using jniLibs and CMake IMPORTED targets, see
    https://developer.android.com/r/tools/jniLibs-vs-imported-targets

  • Try:

    Run with --debug option to get more log output.
    Run with --scan to get full insights.
    Get more help at https://help.gradle.org.

链接:https://app.liuyingyong.cn/build/errorLog/fbbfac20-7bdd-11ef-9f9e-b55e74dc89f2

2024-09-26 15:48 负责人:无 分享
已邀请:
DCloud_Android_DQQ

DCloud_Android_DQQ

DHPlayLibRetailModule 和 HikCloudOpenSDK_v1.4.0_20240328 同时包含了一个同名的so:libgnustl_shared.so

解决办法:

uni1项目是在 plus -> distribute -> google 节点下配置 packageOptions

"packagingOptions": [  
                    "pickFirst 'lib/arm64-v8a/libgnustl_shared.so'",  
                    "pickFirst 'lib/armeabi-v7a/libgnustl_shared.so'"  
                ],

测试增加上述配置可以避免当前报错

  • 1***@qq.com (作者)

    感谢感谢 但是又报了Execution failed for task ':app:processReleaseResources'.

    > A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction

    > Android resource linking failed

    uni.UNI70190C1.app-mergeReleaseResources-22:/values/values.xml:2198: error: resource attr/colorPrimaryVariant (aka uni.UNI70190C1:attr/colorPrimaryVariant) not found.

    error: resource style/Theme.MaterialComponents.DayNight.DarkActionBar (aka uni.UNI70190C1:style/Theme.MaterialComponents.DayNight.DarkActionBar) not found.

    uni.UNI70190C1.app-mergeReleaseResources-22:/values/values.xml:2191: error: style attribute 'attr/colorPrimaryVariant (aka uni.UNI70190C1:attr/colorPrimaryVariant)' not found.

    uni.UNI70190C1.app-mergeReleaseResources-22:/values/values.xml:2192: error: style attribute 'attr/colorOnPrimary (aka uni.UNI70190C1:attr/colorOnPrimary)' not found.

    uni.UNI70190C1.app-mergeReleaseResources-22:/values/values.xml:2194: error: style attribute 'attr/colorSecondary (aka uni.UNI70190C1:attr/colorSecondary)' not found.

    uni.UNI70190C1.app-mergeReleaseResources-22:/values/values.xml:2195: error: style attribute 'attr/colorSecondaryVariant (aka uni.UNI70190C1:attr/colorSecondaryVariant)' not found.

    uni.UNI70190C1.app-mergeReleaseResources-22:/values/values.xml:2196: error: style attribute 'attr/colorOnSecondary (aka uni.UNI70190C1:attr/colorOnSecondary)' not found.

    uni.UNI70190C1.app-mergeReleaseResources-22:/values/values.xml:2198: error: resource attr/colorPrimaryVariant (aka uni.UNI70190C1:attr/colorPrimaryVariant) not found. 这个错误

    2024-09-27 10:05

  • DCloud_Android_DQQ

    回复 1***@qq.com: 这是另外的问题了。 你需要排查一下添加的资源是否符合原生规则

    2024-09-27 16:34

要回复问题请先登录注册