首页 > 解决方案 > Cordova Android Emulator 给出 Uncaught SyntaxError: Unexpected identifier

问题描述

我要Uncaught SyntaxError: Unexpected identifier声明let,在真实设备上使用 APK 进行测试时,代码运行良好。我正在通过检查来自 chrome://inspect/#devices 的设备来检查错误。

Javascript代码是:

let options = {
    width: 256,
    height: 256,
    colorDark: "#000000",
    colorLight: "#ffffff",
};

得到错误:Uncaught SyntaxError: Unexpected identifier

标签: javascriptandroidcordovaandroid-emulatorphonegap

解决方案


推荐阅读