I’m having an issue with platform types and calling into Java land from Kotlin.. The error I get: Type mismatch: inferred type is ByteArray? but ByteBuffer! was expected
The decompiled Java code I’m calling looks like this:
public Frame.Builder setImageData(ByteBuffer var1, int var2, int var3, int var4)
The signature of the function that produces the ByteArray? looks like this:
fun convertYUV420888ToNV21(imgYUV420: Image): ByteArray?
I then pass the returned ByteArray? as var1 in setImageData. Any idea how I can get this to compile? I’d prefer to use the non-nullable type but that doesn’t please the compiler either.