【HarmonyOS】not supported when useNormalizedOHMUrl is not true.
【HarmonyOS】 not supported when useNormalizedOHMUrl is not true.
问题背景:
集成三方库编译时,IDE提示报错信息如下:
hvigor ERROR: Bytecode HARs: [@cashier_alipay/cashiersdk] not supported when useNormalizedOHMUrl is not true.
- Try the following:
Please check useNormalizedOHMUrl in the project-level build-profile.json5 file.
hvigor ERROR: Failed :entry:default@GenerateLoaderJson…
hvigor ERROR: BUILD FAILED in 1 s 56 ms
hvigor错误:当useNormalizedOHMUrl不为true时,不支持字节码HARs:[@cashier_alipay/cashiersdk]。
-尝试以下操作:
请检查项目级build-profile.json5文件中使用的Normalized OHMUrl。
解决方案:
在项目根节点的编译配置build_profile.json5中,添加
caseSensitiveCheck
useNormalizedOHMUrl
为true
"products": [{"name": "default","signingConfig": "default","compatibleSdkVersion": "5.0.0(12)","runtimeOS": "HarmonyOS","buildOption": {"strictMode": {"caseSensitiveCheck": true,"useNormalizedOHMUrl": true}}}],