Why doesn't “System.out.println” work in Android?

前端 未结 11 837
轮回少年
轮回少年 2020-11-22 07:55

I want to print something in console, so that I can debug it. But for some reason, nothing prints in my Android application.

How do I debug then?

         


        
11条回答
  •  一个人的身影
    2020-11-22 08:03

    There is no place on your phone that you can read the System.out.println();

    Instead, if you want to see the result of something either look at your logcat/console window or make a Toast or a Snackbar (if you're on a newer device) appear on the device's screen with the message :) That's what i do when i have to check for example where it goes in a switch case code! Have fun coding! :)

提交回复
热议问题