运行模拟器都会报这个同样的问题,实在不知道问题出在哪里了。。。
Simulator: E/jswrapper (241): ERROR: Uncaught TypeError: console.time is not a function, src/jsb_polyfill.js:0:0
Simulator: STACK:
Simulator: [0]runSceneImmediate@src/jsb_polyfill.js:31005
Simulator: [1]anonymous@main.js:53
Simulator: [2]anonymous@src/jsb_polyfill.js:18918
Simulator: [3]anonymous@src/jsb_polyfill.js:14891
Simulator: [4]anonymous@src/jsb_polyfill.js:22279
Simulator: [5]onceWrapper@src/jsb_polyfill.js:14047
Simulator: [6]82.EventListeners.invoke@src/jsb_polyfill.js:13893
Simulator: [7]83.proto.emit@src/jsb_polyfill.js:14074
Simulator: [8]callback@src/jsb_polyfill.js:31175
Simulator: D/jswrapper (424): ERROR (…\jswrapper\v8\Object.cpp, 424): Invoking function (0950DDF8) failed!
这个在1.7.0beta4中修复。
。。。折腾我一个周末呀T , T,大大们加油,期待beta 4
有什么办法能现在改一下吗,这个是什么原因导致的呢?
你可以实现一个console.time和console.timeEnd看看。
var Timer = window.performance || Date;
var _timerTable = Object.create(null);
console.time = function (label) {
_timerTable[label] = Timer.now();
};
console.timeEnd = function (label) {
var startTime = _timerTable[label];
var duration = Timer.now() - startTime;
console.log(`${label}: ${duration}ms`);
};