cocos构建的android项目的返回键相应
@Override public boolean dispatchKeyEvent(KeyEvent event) { //返回键 cocosActivity不相应onbackPressed和onKeyDown if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN){ LogUtils.i("dispatchKeyEvent"); getMainState(); } return super.dispatchKeyEvent(event); }