一、当前编辑的页面,预览打不开
1、问题说明
当前编辑的页面,预览打不开,日志提示如下:
Route information is not configured for the current page. To avoid possible redirection issues, configure route information for the page.
Configure route information in D:\MyApplication\entry\src\main\resources\base\profile\main_pages.json
2、问题原因
没有为当前页面配置路由信息。若要避免可能的重定向问题,请配置页面的路由信息。在D:\MyApplication\entry\src\main\resources\base\profile\main_pages.json中配置路由信息
3、解决办法
根据日志提示,找到路由配置文件,并添加对应页面路由,具体步骤如下图:
二、预览器报错:does not meet UI component syntax.
1、问题说明
does not meet UI component syntax.
翻译:不符合UI组件语法
2、问题原因
鸿蒙的开发工具 DevEco Studio 自动生成了.map和.js文件