HarmonyOS开发 使用云数据库(HarmonyOS ArkTS API9以上)【真机调试】遇到的so重名问题解决

文章描述了一次在使用Ohos框架的hvigor构建过程中遇到的错误,涉及多个库文件名冲突。解决方案是检查并可能修改build-profile.json文件中的NAPILibFilterOption,以避免命名冲突,最终通过重新构建解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题报错如下:

/usr/local/bin/node /Users/admin/.hvigor/project_caches/08e11114fe5d1e4ddd3877fbb7765185/workspace/node_modules/@ohos/hvigor/bin/hvigor.js --mode module -p module=entry@default -p product=default assembleHap
> hvigor UP-TO-DATE :entry:default@PreBuild...  
> hvigor UP-TO-DATE :entry:default@GenerateMetadata...  
> hvigor UP-TO-DATE :entry:default@MergeProfile...  
> hvigor Finished :entry:default@BuildNativeWithCmake... after 1 ms 
> hvigor UP-TO-DATE :entry:default@GenerateLoaderJson...  
> hvigor UP-TO-DATE :entry:default@MakePackInfo...  
> hvigor UP-TO-DATE :entry:default@ProcessProfile...  
> hvigor Finished :entry:default@BuildNativeWithNinja... after 1 ms 
> hvigor UP-TO-DATE :entry:default@ProcessResource...  
> hvigor ERROR: Failed :entry:default@ProcessLibs... 
> hvigor ERROR: 2 file found in 'lib/arm64-v8a/libagccrypto.so'. This may cause unexpected errors at runtime.
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+hmcore@1.0.2/oh_modules/@hw-agconnect/hmcore/libs/arm64-v8a/libagccrypto.so
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+crypto-ohos@1.1.2/oh_modules/@hw-agconnect/crypto-ohos/libs/arm64-v8a/libagccrypto.so
     2 file found in 'lib/arm64-v8a/libagcmbedtls.so'. This may cause unexpected errors at runtime.
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+hmcore@1.0.2/oh_modules/@hw-agconnect/hmcore/libs/arm64-v8a/libagcmbedtls.so
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+crypto-ohos@1.1.2/oh_modules/@hw-agconnect/crypto-ohos/libs/arm64-v8a/libagcmbedtls.so
     2 file found in 'lib/armeabi-v7a/libagccrypto.so'. This may cause unexpected errors at runtime.
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+hmcore@1.0.2/oh_modules/@hw-agconnect/hmcore/libs/armeabi-v7a/libagccrypto.so
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+crypto-ohos@1.1.2/oh_modules/@hw-agconnect/crypto-ohos/libs/armeabi-v7a/libagccrypto.so
     2 file found in 'lib/armeabi-v7a/libagcmbedtls.so'. This may cause unexpected errors at runtime.
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+hmcore@1.0.2/oh_modules/@hw-agconnect/hmcore/libs/armeabi-v7a/libagcmbedtls.so
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+crypto-ohos@1.1.2/oh_modules/@hw-agconnect/crypto-ohos/libs/armeabi-v7a/libagcmbedtls.so
     2 file found in 'lib/x86_64/libagccrypto.so'. This may cause unexpected errors at runtime.
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+hmcore@1.0.2/oh_modules/@hw-agconnect/hmcore/libs/x86_64/libagccrypto.so
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+crypto-ohos@1.1.2/oh_modules/@hw-agconnect/crypto-ohos/libs/x86_64/libagccrypto.so
     2 file found in 'lib/x86_64/libagcmbedtls.so'. This may cause unexpected errors at runtime.
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+hmcore@1.0.2/oh_modules/@hw-agconnect/hmcore/libs/x86_64/libagcmbedtls.so
     - /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/oh_modules/.ohpm/@hw-agconnect+crypto-ohos@1.1.2/oh_modules/@hw-agconnect/crypto-ohos/libs/x86_64/libagcmbedtls.so
     Detail: Rename the native compilation products of the module, or configure napiLibFilterOption in /Users/admin/DevEcoStudioProjects/relaxtomato/Application/entry/build-profile.json5.
> hvigor ERROR: BUILD FAILED in 383 ms 

Process finished with exit code -1

论坛大佬提供的解决方案

so重名了,按照文档配置一下试试!

文档中心

 

cke_474.png

 注意是在Entry下的build-profile.json5文件

 

重新构建 

成功解决

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Hiphon001

分享日常bug解决方案

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值