- Creator 版本:
- 目标平台:
- 首个报错:
- 手机型号:
- 编辑器操作系统:
- 重现概率:
代码
@Override
public void onResp(BaseResp baseResp) {
Log.e("onResp", "" + baseResp.errCode);
// 登录授权
if (baseResp instanceof SendAuth.Resp) {
SendAuth.Resp sendAuthResp = (SendAuth.Resp) baseResp;
if (sendAuthResp.errCode == BaseResp.ErrCode.ERR_OK) {
String code = ((SendAuth.Resp) baseResp).code;
Log.i("wxentry", "code = " + code);
// 这里将code给到cocos
CocosHelper.runOnGameThread(new Runnable() {
@Override
public void run() {
Log.i("调用cocos", "");
CocosJavascriptJavaBridge.evalString("cc.log(\"Javascript Java bridge!\")");
}
});
}
}
}
控制台输出
E/onResp: 0
I/wxentry: code = 021gum100Q1GvM1N9a200lhjdkfhakhf
D/MouseWheelSynthesizer: mMoveStepInDp: 64, mMoveStepInPixel: 192, mUpTimeDelayed: 100
D/ViewRootImpl: ViewRootImpl mIsInProductivePCDisplay: false
D/InputEventReceiver: dispatchInputInterval 1000000
W/libEGL: EGLNativeWindowType 0xd0556248 disconnect failed
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/HiTouch_PressGestureDetector: onAttached, package=com.wzy.gbmj, windowType=1, mIsHiTouchRestricted=false
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
I/HwViewRootImpl: removeInvalidNode all the node in jank list is out of time
D/OpenGLRenderer: disableOutlineDraw is true
D/DecorView: showOrHideHighlightView: hasFocus=true; winMode=1; isMrgNull=true
W/InputMethodManager: startInputReason = 1
直接中官方的代码, 咱也不知道为啥不行
