I found there is a ByteArray.toString(charset:Charset) function in Kotlin,when I use that function in android studio IDE,it gets a syntax error. But I have tried the same code in Kotlin org site, it works well. How can I convert a ByteArray to String in Kotlin?
It seems that you didn't configure your project for Kotlin (there is no kotlin-runtime.jar in your classpath). Try to select the line with the error, press Alt+Enter
and in context menu choose "Kotlin not configured" -> "Configure"
Or manually add kotlin-runtime.jar to your classpath
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With