Why shouldn't I use System.out.println() in android

后端 未结 7 1131
无人共我
无人共我 2020-11-29 07:45

In the Android Open Source Project\'s code style, it states that we shouldn\'t use System.out.println() but I don\'t understand why. Can anyone explain? What sh

7条回答
  •  半阙折子戏
    2020-11-29 08:03

    System.out.println("") in android will not run well because there is no Terminal that the app is corrected to.

    You would be better off using Log.(d)(v)(e)(i)(w), because there is something actively monitoring LogCat.

    System.out.println() will print to LogCat, but only after an additional set of System instuctions, making it not as efficient, however, as i said, it still works.

提交回复
热议问题