LibGDX logging not showing up in logcat

人走茶凉 提交于 2019-12-01 14:10:48

问题


I cannot get LibGDX logging to work in Android Studio. First i thought I had the same problem as my previous question but made sure my app updated on debug.

playButton.addListener(new ChangeListener()
    {
        @Override
        public void changed(ChangeEvent event, Actor actor) {
        Gdx.app.debug("BUTTON", "playButton Pressed");
        optionButton.addAction(Actions.moveBy(-200, 0, 2));
    }

});

The test action on the option button is carried out but i cannot get the debug log to show up.


回答1:


The default Log level is LOG_INFO. For the Gdx.app.debug call to work, you must first call Gdx.app.setLogLevel(Application.LOG_DEBUG); once (probably the first line in your Game's constructor so you can easily change it).




回答2:


Use Gdx.app.log or even System.out.println (write sout (syso in eclipse) and enter );



来源:https://stackoverflow.com/questions/26241333/libgdx-logging-not-showing-up-in-logcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!