Cocos Creator v1.7.0 内测版发布帖(11月17日更新 rc.2)

帖日志

这个是底层打印的。。我之前有 sys.localStorage.setItem(“key”,undefined)

黑屏的问题找到了,是ios调用anysdk方法导致的。官方的模板没有初始化。我全部注释掉了,就好了。

这个。。你上层自己检测一下吧,如果是undefined,你就传"undefined"字符串吧。null同理。

是否有在构建面板,选ios后,然后去掉“ANYSDK”那个Checkbox,再次构建?

你在哪里用 sys.localStorage.setItem 的?

资源管理器里的"搜索"功能,输入*.prefab, 搜不到任何东西.事实上并不支持通配符查找. 1.7 的各版本似乎都有此问题

beta8,mac本安装不了,点击没反应。。。

beta7模拟器,xmlhttprequest请求:
onreadychange事件打印:
readyState,status----- 1 0,然后就XMLHttpRequest_finalize了。
请求的url是正确的。
如果把url改成不可访问的,也是同样打印上面的。

1.6.2beta2的时候是可以正常访问的,而且把URL改成不可访问的,会走onerror事件。
另:1.6.2beta2如果非调试模式无法构建,现在找不到一个适合我的版本了,每个版本都有问题呢。

记得之前用1.7的beta3版本时候,xmlhttprequest是可以有返回的。

这个是什么情况呢,xmlhttprequest又有改动么?@dumganhar

借位问一下,
哪位大神能帮我审核下插件商店的插件…
二个月都没有通过啊 :cry:

那么久… 我反馈一下…

1赞

你是怎么用的,不要总说结果,能用helloworld复现一下么?
examplecase的network test正常么?
XMLHttpRequest_finalize 这个说明你的xmlhttprequest对象被GC了。

谢谢 @Knox 大神 :grinning:

这段代码经过1.7beta3的调试通过了,在1.6.2beta2也是可用的
ajax_remote: function(url,method,async,params,callback){
var result=false;
if(method== undefined)
method = “post”;
if(callback == undefined)
callback=false;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
console.log("-----xhr.readyState----" +xhr.readyState);
console.log("-----xhr.status----" +xhr.status);
if (xhr.readyState === 4) {
if(xhr.status===200){
var data = xhr.responseText;
console.log(’-------xhr responseText-----:’,data);
data=JSON.parse(data);
//callback(data);
callback && callback.call(this, data);
result=data;
}else if(xhr.status===404){
console.log(’------response 404------’);
callback && callback.call(this, null);
result=false;
}else{
console.log(’------response------’,xhr.status);
callback && callback.call(this, null);
result=false;
}
}else{
console.log(’-----xhr调用服务器出错或者其它状态readyState,status-----’,xhr.readyState,xhr.status);
result=false;
}
};
xhr.open(method, url, async);//true同步,false异步
(method==‘POST’ || method==‘post’)&&(xhr.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”));
xhr.timeout = 5000; // 超时时间,单位是毫秒
xhr.onload = function () {
// 请求完成。在此进行处理。
console.log(’----------xhr onload----------’);
};
xhr.ontimeout = function (e) {
// XMLHttpRequest 超时。在此做某事。
console.log(’----------xhr ontimeout----------’,e);
callback && callback.call(this,null);
result=false;
};
xhr.onerror = function (e) {
// XMLHttpRequest 超时。在此做某事。
console.log(’----------xhr onerror----------’,e);
callback && callback.call(this,null);
result=false;
};
xhr.send(params);
return result;
},

你写代码都不排版的么?看得眼睛要花了。

排版了,上传就这样了。我回复完成后,自己再编辑看的话是排版的,这个是论坛的功能么,自动重新去除空格排版?
ajax_remote: function(url,method,async,params,callback){
var result=false;
if(method== undefined)
method = “post”;
if(callback == undefined)
callback=false;
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
console.log("-----xhr.readyState----" +xhr.readyState);
console.log("-----xhr.status----" +xhr.status);
if (xhr.readyState === 4) {
if(xhr.status===200){
var data = xhr.responseText;
console.log(’-------xhr responseText-----:’,data);
data=JSON.parse(data);
//callback(data);
callback && callback.call(this, data);
result=data;
}else if(xhr.status===404){
console.log(’------response 404------’);
callback && callback.call(this, null);
result=false;
}else{
console.log(’------response------’,xhr.status);
callback && callback.call(this, null);
result=false;
}
}else{
console.log(’-----xhr调用服务器出错或者其它状态readyState,status-----’,xhr.readyState,xhr.status);
result=false;
}
};
xhr.open(method, url, async);//true同步,false异步
(method==‘POST’ || method==‘post’)&&(xhr.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”));
xhr.timeout = 5000; // 超时时间,单位是毫秒
xhr.onload = function () {
// 请求完成。在此进行处理。
console.log(’----------xhr onload----------’);
};
xhr.ontimeout = function (e) {
// XMLHttpRequest 超时。在此做某事。
console.log(’----------xhr ontimeout----------’,e);
callback && callback.call(this,null);
result=false;
};
xhr.onerror = function (e) {
// XMLHttpRequest 超时。在此做某事。
console.log(’----------xhr onerror----------’,e);
callback && callback.call(this,null);
result=false;
};
xhr.send(params);
return result;
},

用markdown语法。

你的代码

1赞

负责的人员今天请假了,明天我叫他看看

1赞

1.7beta7 创建helloword 工程 ,使用andriodStudio 3.0 gradle 4.1 打包 运行直接闪退。

$ adb shell am start -n "org.cocos2d.helloworld/org.cocos2dx.javascript.AppActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 3587 on device mit-droid4x_win-127.0.0.1:26944
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
D/jswrapper: libuv version: 1.13.1
D/jswrapper: Debugger listening..., visit [ chrome-devtools://devtools/bundled/inspector.html?v8only=true&ws=0.0.0.0:5086/00010002-0003-4004-8005-000600070008 ] in chrome browser to debug!
D/jswrapper: For help see https://nodejs.org/en/docs/inspector
D/cocos2d-x: cocos2d: fullPathForFilename: No file found at script/jsb_prepare.jsc. Possible missing file.
W/dalvikvm: dvmFindClassByName rejecting 'org/cocos2dx/lib/Cocos2dxLocalStorage'
D/cocos2d-x: cocos2d: fullPathForFilename: No file found at script/jsb_boot.jsc. Possible missing file.
A/libc: Fatal signal 4 (SIGILL) at 0x00000e03 (code=0), thread 3601 (Thread-112)
Application terminated.