【求助,非常感谢】
js版 [即时通信] sdk
开发使用的游戏引擎:Cocos Creator
问题描述:
在 web 平台上,已经调通了所有功能,Creator 打包 Android,在 Android 平台上,调用 createIMClient 接口,不成功。
===========
相关代码:
cc.log("M_IM 开始连接");
// 使用自己的id登陆
realtime.createIMClient(this._app.playerData.id).then(function(client)
{
cc.log("M_IM 登陆成功!");
}).catch((error) =>
{
// 连接失败
cc.log("M_IM 登陆失败!");
console.error(error);
});
==============
运行log:
D/jswrapper: JS: M_IM 开始连接
D/jswrapper: JS: in M_VS [onLoad]
D/jswrapper: JS: Activate: 70.67500000000018ms
D/cocos2d-x: In the constructor of HttpClient!
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
I/DpmTcmClient: RegisterTcmMonitor from: com.android.okhttp.TcmIdleTimerMonitor
D/JniHelper: JniHelper::getJavaVM(), pthread_self() = -891291360
D/JniHelper: JniHelper::getJavaVM(), pthread_self() = -891291360
D/WebSocket.cpp: WebSocket thread start, helper instance: 0xcf7fb710
D/WebSocket.cpp: NOTICE: Initial logging level 911
D/WebSocket.cpp: NOTICE: Libwebsockets version: 2.1.0 james@James-Chen.local-v3.4-139-gbdcf7f8
D/WebSocket.cpp: NOTICE: IPV6 compiled in and enabled
D/WebSocket.cpp: NOTICE: libev support not compiled in
D/WebSocket.cpp: NOTICE: libuv support not compiled in
D/WebSocket.cpp: NOTICE: Threads: 1 each 1024 fds
D/WebSocket.cpp: NOTICE: mem: platform fd map: 4096 bytes
D/WebSocket.cpp: NOTICE: Compiled with OpenSSL support
D/WebSocket.cpp: NOTICE: mem: per-conn: 376 bytes + protocol rx buf
D/WebSocket.cpp: scheme: wss, host: rtm56.leancloud.cn, port: 0, path: /
D/WebSocket.cpp: WARNING: CA Root file isn't set. SSL connection will not peer server certificate
D/WebSocket.cpp: NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 on
D/WebSocket.cpp: NOTICE: lws_protocol_init
D/WebSocket.cpp: WebSocket (0xe3f8e290) Unhandled websocket event: 32
D/WebSocket.cpp: WebSocket (0xe3f8e290) Unhandled websocket event: 29
D/WebSocket.cpp: NOTICE: accepting self-signed certificate
D/WebSocket.cpp: WebSocket (0xe3f8e290) Unhandled websocket event: 24
D/WebSocket.cpp: WebSocket (0xe3f8e290) Unhandled websocket event: 2
D/WebSocket.cpp: onConnectionOpened...: 0xe3f8e290, client protocols: lc.protobuf2.1, server selected protocol: lc.protobuf2.1
D/jswrapper: JS: [ERROR]: Unhandled promise rejection [object Object]