qq_hr_5
2019-06-29 18:05
(function(){
delete this.nw;
this.chrome = null
})();console.group("Sat Jun 29 2019 18:03:01 GMT+0800 (中国标准时间) app.json 文件解析错误")
console.error("undefined\nExpecting 'STRING','NUMBER','NULL','TRUE','FALSE','{','[', got ]\n 3 | \"pages/base/base\",\n 4 | \"pages/cloud/cloud\",\n> 5 | \n | ^\n 6 | ],\n 7 | \"window\": {\n 8 | \"backgroundColor\": \"#F6F6F6\",")
console.groupEnd()
app.json文件配置不正确,应该把整个文件代码截图出来能够更快的定位到问题。
1、检查符号是否正确,都需要是英文的符号
2、json文件当中不能写注释
3、可以参考项目首页右下角我的代码的配置
"pages/cloud/cloud", "navigationBarTextStyle": "white",
把这两句后面的逗号删除掉。
{
"pages": [
"pages/base/base",
"pages/cloud/cloud",
],
"window": {
"backgroundColor": "#F6F6F6",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#F00",
"navigationBarTitleText": "入门小程序",
"navigationBarTextStyle": "white",
},
"tabBar": {
"color":"#ccc",
"selectedColor":"#f00",
"list": [{
"pagePath": "pages/base/base",
"text": "基础",
"iconPath": "imges/base.png",
"selectedIconPath":
"images/base-actived.png"
},{
"pagePath": "pages/cloud/cloud",
"text": "云开发",
"iconPath": "imges/cloud.png",
"selectedIconPath":
"images/cloud-actived.png"
}]
}
}
轻松入门微信小程序与云开发
64581 学习 · 1742 问题
相似问题