'java.lang.RuntimeException in kotlin
I cannot print simple hello world script in kotlin. I connected my mobile phone. Although I enabled usb debugging, I got this error :
java.lang.RuntimeException
here is my code:
fun main() { println("hellooo") }
Solution 1:[1]
You can Use Log like this. (It's quit good in android)
Log.d("TAG", "hellooo")
Log.i("TAG", "hellooo")
Log.w("TAG", "hellooo")
Log.e("TAG", "hellooo")
But you also can use print and println in kotlin
print("hellooo")
println("hellooo")
Check for is there any other error.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Bhavin Solanki |
