HarmonyOS 工程能否依赖外部模块源码

比如我的工程在~/test/ohos_project/test_project 下的。

现在要依赖一个模块在~/test/ohos_plugin/test_module下的模块。发现编译的时候会报错。请问该如何依赖呢?

报错日志:

ERROR:  ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "/Users/xxx/git_project/zcy_app/ohos_plugins/flutter_permission_handler/permission_handler_ohos/ohos/permissionhandler/index.ets"  
ERROR:  ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "/Users/xxx/git_project/zcy_app/ohos_plugins/flutter_permission_handler/permission_handler_ohos/ohos/permissionhandler/index.ets" 
  • 1.
  • 2.
HarmonyOS
2024-08-23 12:12:19
759浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
zxjiu

尝试下以下链接办法:

https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ide-har-import-0000001547293682

不是同一个工程下的源码是不支持依赖的,可以参考一下链接去对代码进行元服务分包及依赖。

https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ide-atomic-service-subpackage-0000001574295213

分享
微博
QQ
微信
回复
2024-08-23 15:12:45


相关问题
HarmonyOS 模块依赖问题
786浏览 • 1回复 待解决
如何配置模块源码路径
1666浏览 • 1回复 待解决
模块依赖冲突/依赖仲裁方法?
2170浏览 • 1回复 待解决
HarmonyOS工程模块
694浏览 • 1回复 待解决
HarmonyOS feature模块循环依赖
857浏览 • 1回复 待解决
HarmonyOS 工程模块化问题
825浏览 • 1回复 待解决
HarmonyOS 有没有一多工程demo示例源码
638浏览 • 1回复 待解决
HarmonyOS 模块库互相依赖报错
914浏览 • 1回复 待解决
HarmonyOS 能否模块使用@Styles
759浏览 • 1回复 待解决
HarmonyOS 能否提供Web样例工程代码?
989浏览 • 1回复 待解决