I need to print some str to console (Android Studio) using Kotlin. I\'ve tried the:
Log.v()
Log.d()
Log.i()
Log.w()
Log.e()
methods. But i
There are a couple of ways.
You can use Log.d("TAG", "message");
for example but first you need to import Log.
import android.util.Log
{...}
Log.d("TAG", "message")
{...}
Source: https://developer.android.com/reference/android/util/Log.html
You can also use kotlin's print and println function.
Example:
{...}
print("message")
println("other message")
{...}
Source: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/