Harmony 开发环境:
Stage模型,API version 9
DevEco Studio 3.1 Release版本进行编译运行。
控制台报错:
A preview error may have occurred. Switch to the Log tab to view details.
翻译:
可能发生了预览错误。切换到“日志”选项卡以查看详细信息。
可能原因:
找不到要跳转的页面,出错位置:
router.pushUrl({ url: "pages/My/MyBookings" });
解决方案:
在main_pages.json文件中写入要跳转的页面,如下所示
{
"src": [
"pages/Splash/Splash",
"pages/Guide/Index",
"pages/NavigateBottom",
"pages/Notify/Notify",
"pages/My/MyBookings"
]
}