title: How to convert ByteArray to String with specified charset in Kotlin
body: <p>I found there is a <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/to-string.html" rel="noreferrer">ByteArray.toString(charset:Charset)</a> 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?</p>
  
  <p><a href="https://i.stack.imgur.com/QGB9j.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QGB9j.png" alt="Android Studio error Message"></a></p>