LibGDX日志记录未显示在logcat中 [英] LibGDX logging not showing up in logcat

查看:111
本文介绍了LibGDX日志记录未显示在logcat中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法让LibGDX日志记录在Android Studio中运行。首先我认为我遇到了与上一个问题相同的问题,但确保我的应用程序在调试时更新。

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.

推荐答案

默认日志级别为 LOG_INFO 。对于 Gdx.app.debug 调用工作,必须先调用 Gdx.app.setLogLevel(Application.LOG_DEBUG); 一次(可能是Game的构造函数中的第一行,因此您可以轻松更改它)。

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).

这篇关于LibGDX日志记录未显示在logcat中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆