Creator 版本号:1.4.2
运行时目标平台:Andorid
js代码
udid = jsb.reflection.callStaticMethod('com/core/Core', 'getUDID', '()Ljava/lang/String;')
java代码
if(_instace._isInit == false)
return "";
if(OpenUDID_manager.isInitialized() == false)
{
OpenUDID_manager.sync(_instace._context);
}
String uniqueId = OpenUDID_manager.getOpenUDID();
Log.d(TAG, "OpenUDID: " + uniqueId);
return uniqueId;
打印的日志会反复出现以下内容
04-06 11:27:59.442 21209-21238/com.slotsplus.free E/cocos js error:: assets/src/jsb_polyfill.js line 21339 > eval line:2 msg:TypeError: this.__initProps__ is not a function
04-06 11:27:59.458 21209-21238/com.slotsplus.free D/JniHelper: JniHelper::getJavaVM(), pthread_self() = -1607112400
04-06 11:27:59.458 21209-21238/com.slotsplus.free D/SlotsCore: OpenUDID: 60594b043f26ce56
在polyfill中的21339相关内容是:
m.cleanEval_fireClass = function(code) {
try {
var fireClass = eval(code); //line 21339
console.log(code);
}
catch (e) {
console.log(code);
}
return fireClass;
};
我把21339打印出来了:
(function(...args){
this.__initProps__(fireClass);
var cs=fireClass.__ctors__;
try{
(cs[0]).apply(this,args);
(cs[1]).apply(this,args);
}catch(e){
cc._throw(e);
}
})
求@jare老师指导以下