HarmonyOS 鸿蒙Next使用Navigationt跳转失败
HarmonyOS 鸿蒙Next使用Navigationt跳转失败
log如下:
07-25 10:51:28.501 17176-17176 C03922/AceNavigation pid-17176 I [js_navigation_stack.cpp(GetNavDestinationNodeInUINode)-(100000:100000:scope)] router map is invalid, child size is not one: 3
07-25 10:51:28.501 17176-17176 C03922/AceNavigation pid-17176 I [js_navigation_stack.cpp(GetNavDestinationNodeInUINode)-(100000:100000:scope)] router map is invalid, child size is not one: 2
07-25 10:51:28.501 17176-17176 C03922/AceNavigation pid-17176 I [js_navigation_stack.cpp(GetNavDestinationNodeInUINode)-(100000:100000:scope)] router map is invalid, child size is not one: 0
07-25 10:51:28.501 17176-17176 C03F00/ArkCompiler pid-17176 E [ecmascript] When the route jump, Cannot find module ‘com.tklife.tlifesalespad/entry/ets/pages/login/LoginPage’
07-25 10:51:28.501 17176-17176 C03922/AceNavigation pid-17176 E [ark_js_runtime.cpp(LoadDestinationFile)-(100000:100000:scope)] load pageSourceFile failed: 100002
07-25 10:51:28.501 17176-17176 C03922/AceNavigation pid-17176 E [js_navigation_stack.cpp(LoadDestination)-(100000:100000:scope)] load page failed: LoginPage
该问题非必现
更多关于HarmonyOS 鸿蒙Next使用Navigationt跳转失败的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
问题解决了吗?
can't find name in config file: PoetriesView
get route name failed
load page failed: PoetriesView
roadmap如下:
确定name是唯一的。
更多关于HarmonyOS 鸿蒙Next使用Navigationt跳转失败的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
Clean Project后问题消失~~
我也发现是这么处理的
{
"routerMap": [
{
"name": "LoginPage",
"pageSourceFile": "src/main/ets/pages/login/LoginPage.ets",
"buildFunction": "LoginPageBuilder",
"data": {
"description": "this is LoginPage"
}
},
...
}
map文件如上,检查代码确定LoginPage唯一
HarmonyOS 鸿蒙Next使用Navigationt跳转失败可能是由于路由配置错误、跳转逻辑不当或页面未正确注册导致。请检查路由配置是否正确,包括目标页面的URL或路由名称。同时,确认跳转逻辑在组件的生命周期中正确执行,且路由守卫(如设置)允许跳转。如果问题依旧无法解决,请检查控制台错误信息或日志,以获取更多线索。如果问题依旧没法解决请加我微信,我的微信是itying888。
更多关于HarmonyOS 鸿蒙Next使用Navigationt跳转失败的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html