The project uses COCOS2D-JS 3.6 and protobuf.js, but when packaged into an APK runtime always error (Evaluatedok = = Js_false), no specific file and line number error messages.
Only one file to troubleshoot, and finally to locate the problem is ProtoBuf.min.js. iOS and individual browsers are no problem, only Android apk has a problem, estimated to be SpiderMonkey Android version of the problem.
The general appearance (Evaluatedok = = Js_false) is the syntax of the JS file is problematic, but the check again did not find grammatical errors.
No way, had to put the code format after a piece of troubleshooting, Android build a very slow AH =
The last place to locate the syntax error is where to judge the node. JS Environment:
Util.is_node = false;
Try { // There is no reliable-to detect node. js as an environment // Best bet was to Feature-detect, what we actually need. Util.is_node = typeof require = = = ' function ' && typeof require ("FS"). Readfilesync = = = ' function ' && typeof require ("path"). Resolve = = = ' function ' Catch (e) {}
There seems to be no grammatical errors, but Judge Node-js environment is not much use, can only put Try-catch blocks are annotated, and then run OK.
Pack COCOS2D-JS 3.6 Project with Protobuf.js under Android