[]发布微信小游戏json格式问题
WAGame.js:3 gameThirdScriptError
Unexpected token in JSON at position 27;at api readFile success callback function
SyntaxError: Unexpected token in JSON at position 27
at JSON.parse (<anonymous>)
at Function.MiniAdpter.getJson (http://127.0.0.1:9973/game/code.js:20980:15)
at Function.MiniLoader.onReadNativeCallBack (http://127.0.0.1:9973/game/code.js:21386:25)
at Handler.__proto.runWith (http://127.0.0.1:9973/game/code.js:712:41)
at Function.success (http://127.0.0.1:9973/game/code.js:21580:33)
at Object.success (http://127.0.0.1:9973/game/__d ... :18788)
at c (http://127.0.0.1:9973/game/__dev__/WAGame.js:4:3519)
at Function.<anonymous> (http://127.0.0.1:9973/game/__dev__/WAGame.js:4:3702)
at n.function.setTimeout (http://127.0.0.1:9973/game/gamePage.html:1:8644)
at http://127.0.0.1:9973/game/__dev__/WAGame.js:3:18788
在layaIDE里能正常运行,发布为微信小游戏后如上报错,json格式需要注意!!!
Unexpected token in JSON at position 27;at api readFile success callback function
SyntaxError: Unexpected token in JSON at position 27
at JSON.parse (<anonymous>)
at Function.MiniAdpter.getJson (http://127.0.0.1:9973/game/code.js:20980:15)
at Function.MiniLoader.onReadNativeCallBack (http://127.0.0.1:9973/game/code.js:21386:25)
at Handler.__proto.runWith (http://127.0.0.1:9973/game/code.js:712:41)
at Function.success (http://127.0.0.1:9973/game/code.js:21580:33)
at Object.success (http://127.0.0.1:9973/game/__d ... :18788)
at c (http://127.0.0.1:9973/game/__dev__/WAGame.js:4:3519)
at Function.<anonymous> (http://127.0.0.1:9973/game/__dev__/WAGame.js:4:3702)
at n.function.setTimeout (http://127.0.0.1:9973/game/gamePage.html:1:8644)
at http://127.0.0.1:9973/game/__dev__/WAGame.js:3:18788
在layaIDE里能正常运行,发布为微信小游戏后如上报错,json格式需要注意!!!
没有找到相关结果
已邀请:
1 个回复
Aar0n
赞同来自:
开发者识别文件编码的方法示例(AS3版):