1

据我所知,我无法从 cmd 过滤应用程序名称,所以我必须使用标签来代替......

我可以正确过滤,但我无法获得我想要的输出格式......

我正在尝试以下,一切正常......

Runtime.getRuntime().exec(new String[] { "logcat", "-d",
    BasicDefinitions.APP_TAG + ":I *:S" });

如果我更改-d-d -v long它不再起作用... -v 参数是有效的参数,如此处所述http://developer.android.com/tools/debugging/debugging-log.html#outputFormat

4

1 回答 1

0

Since you are using String[] type for the parameters you can not combine any of them:

Runtime.getRuntime().exec(new String[] { "logcat", "-d", "-v", "long", BasicDefinitions.APP_TAG + ":I", "*:S" });
于 2013-01-13T08:23:55.307 回答