Using LogCat on JellyBean

社会主义新天地 提交于 2019-12-04 03:42:06

So outside of rooting my device, is there any way to read the LogCat output of my app on my phone directly?

Not really. You can read discussions on aLogcat bugtracker about this issue:

After doing some reading and some testing, I've found three ways to make aLogcat work, all of which use root.

More detailed discussion about READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

sudocoder

What do you think about writing directly to the screen using a textView? Of course this would only be for a debug build.

This post contains code that prints logcat errors on the screen Write android logcat data to a file

Now all that's left to do is to put try/catch stmts in your code, where the try surrounds code you think is problematic. The catch delegates to writing the error message to your screen.

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