【干货#010】解决 Page[pages/XXX/XXX] not found错误
来源:互联网 发布:《unity3d视频教程》 编辑:程序博客网 时间:2024/05/21 09:17
缘起
小程序在模拟机和安卓真机下预览正常,在苹果机出现错误:
Page[pages/XXX/XXX] not found.May be caused by :1. Forgot to add page route in app.json.2. Invoking Page() in async task.
截图如下:
方法
查找网上也有好多人出现这种错误,问题原因是:.js 文件中 没有使用Page() 函数注册页面,导致后续页面注册被中断。
如果是这种原因的话,模拟机也会出现。因此,这个问题不是这个原因导致的。最后在小程序官方社区发现问题原因为:ES6语法不支持,需转为ES5。
在开发工具的"项目设置"里,选择上ES6转ES5即可。如下图所示:
参考
1. 灵异事件:按钮无法点击 Do not have xx handler in current page:http://www.jianshu.com/p/75a1c6a8a316
更多实战干货,可查看:
小程序页面滚动实现广告条隐藏
细解小程序自适应单位rpx
小程序实现地址自动解析和导航
小程序"页面滚动"与"滚动视图区域"区别
小程序使用有赞ZanUI
更多常见错误,可查看:
解决 Page[pages/XXX/XXX] not found错误
解决"Failed to load image"错误
关注晓程序干货店,分享小程序开发干货知识
阅读全文
0 0
- 【干货#010】解决 Page[pages/XXX/XXX] not found错误
- 错误:'xxx/xxx.h' file not found
- "xxx"framework not found "xxx"
- Parameter xxx not found.
- framework xxx not found
- 解决 binding.gyp not found (xxx/xxx/xxx) while trying to load binding.gyp 问题
- 解决应用程序执行时出现“-/bin/sh: ./xxx: not found”
- modprobe XXX not found 解决与Depmod命令
- 解决 ld:library not found for -lPods-XXX
- 如何解决Github上的 xxx.h文件not found
- -/bin/sh: XXX: not found
- -/bin/sh: XXX: not found
- sudo xxx command not found
- Solution: `GLIBC_2.xxx' not found”
- xxx.h file not found
- library not found for -xxx
- openwrt ./XXX not found问题解决
- library not found for -xxx
- 反射的初步了解
- Mean Average Precision vs Mean Reciprocal Rank
- Android实现底部导航栏
- 树的应用之树的同构
- 微信小程序 —— 验证码获取倒计时效果
- 【干货#010】解决 Page[pages/XXX/XXX] not found错误
- 模板方法模式
- 概率论_随机变量及其分布1
- Oracle PL/SQL DBA 编程实践基础
- Android报错总结
- 人工智能导论(2)——启发式算法(八数码问题)
- SQL 单列转多列
- CRASH fd leak
- python内置函数getattr(),hasattr(),setattr(),delattr()【属性相关】