遇到一个非常无助的问题!!!!
在安卓6.0系统(Nexus模拟器和红米3s)中调试(或安装apk后运行),会出现所有页面的所有CSS失效的问题,样式全无,布局乱套,但是功能几乎不受影响(页面切换、网络访问、存储、事件绑定等方面的功能都正常)
在安卓6.0启动应用报这个错误:
Uncaught TypeError: Cannot read property '0' of undefined at js/mui.min.js:8
给mui.min.js格式化后,错误信息是:
Uncaught TypeError: Cannot read property '0' of undefined at js/mui.min.js:2662
_getPage: function(a, b) {
return this.loop ? a > this.itemLength - (b ? 2 : 3) ? (a = 1, time = 0) : (b ? -1 : 0) > a ? (a = this.itemLength - 2, time = 0) : a += 1 : (b || (a > this.itemLength - 1 ? (a = 0, time = 0) : 0 > a && (a = this.itemLength - 1, time = 0)), a = Math.min(Math.max(0, a), this.itemLength - 1)),
this.pages[a][0] //2662就是这一行
},
其他版本的系统中(包括iOS)无报错信息,运行正常,只有在安卓6.0出问题,求大家帮助!!
4 个回复
i***@qq.com (作者)
btw, 页面内的CSS正常有效
DCloud_heavensoft
建议使用chrome调试看看哪里出错了。
不要嫌麻烦,按照HBuilder菜单运行里的chrome调试Android手机的教程好好配下,以后能少很多痛苦。
i***@qq.com (作者)
Chrome调试也只是在mui.min.js的2662行(代码见问题描述)发现了错误(Cannot read property '0' of undefined),_getPage的参数:a = 2, b = true;this.pages是一个大小为1的数组。请问有可能是哪里出错了?
2016-08-01 14:05
i***@qq.com (作者)
我贴了图,请看一下
2016-08-01 14:28
i***@qq.com (作者)
正常:
安卓6.0:
i***@qq.com (作者)
出错的mui.min.js 是在首页的子页面中引用的,相当于是在官方HelloMUIDemo的list.html