Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何使logcat可点击?_Android_Logcat - Fatal编程技术网

Android 如何使logcat可点击?

Android 如何使logcat可点击?,android,logcat,Android,Logcat,现在在我的应用程序中,我使用自定义日志进行只显示调试 我看到了一个关于制作链接的博客,点击logcat行,它就转到了那行 private static String tag() { StackTraceElement trace = Thread.currentThread().getStackTrace()[4]; String fileName = trace.getFileName(); String classPath = trace.ge

现在在我的应用程序中,我使用自定义日志进行只显示调试

我看到了一个关于制作链接的博客,点击logcat行,它就转到了那行

private static String tag() {
        StackTraceElement trace = Thread.currentThread().getStackTrace()[4];
        String fileName = trace.getFileName();
        String classPath = trace.getClassName();
        String className = classPath.substring(classPath.lastIndexOf(".") + 1);
        String methodName = trace.getMethodName();
        int lineNumber = trace.getLineNumber();
        return TAG + "# " + className + "." + methodName + "(" + fileName + ":" + lineNumber + ")";
    }
现在它显示在logcat中

:68和:195是行号。它几乎在工作。但是,我不能点击进入代码


我如何解决这个问题?

我相信这个答案会有帮助:在我的情况下,这个链接不起作用T.T无论如何谢谢你的评论我相信这个答案会有帮助:在我的情况下,这个链接不起作用T.T无论如何谢谢你的评论