Cannot access 'body': it is package-private in 'Response'
Moonubanna opened this issue · comments
Praveen singh commented
react-native-star-io10/android/src/main/java/com/stario10module/StarIO10ValueConverter.kt: (711, 26): Cannot access 'body': it is package-private in 'Response'
Faccing issue in bellow function:
private fun httpToBytes(uri: String): ByteArray? {
var bytes: ByteArray? = null
try {
val client = OkHttpClient()
val request = Request.Builder().url(uri).build()
val response = client.newCall(request).execute()
response.body?.bytes()?.let { responseBytes ->
bytes = responseBytes
response.body?.close()
}
} catch (e: Exception){}
return bytes
}
After installing this library its working fine iOS side but android side i am facing above error, Could you please help me.
Thanks in advance.
Guillermo Cubero commented
@Moonubanna this question has been asked several times, so we added it to our wiki.