Hi there, I am coming across weird issues in KMP,...
# multiplatform
s
Hi there, I am coming across weird issues in KMP, use case: I have built KMP video player module and used in native android/iOS projects, when I tried on native android app is crashing due to
Copy code
FATAL EXCEPTION: main
Process: xyz.penpencil.physicswala, PID: 7342
java.lang.ClassCastException: com.google.android.exoplayer2.ui.AspectRatioFrameLayout cannot be cast to androidx.media3.ui.AspectRatioFrameLayout
My native android project already has Google's Exoplayer and Media3 player, but I am sure that my KMP module is explicitly using
androidx.media3.ui.AspectRatioFrameLayout
not google 's exoplayer. Still compiler trying to use com.google.android.exoplayer2.ui.AspectRatioFrameLayout the workaround which I found is, I ended up adding below's dependencies in native projects as well
implementation ("androidx.media3:media3-ui:1.4.0")
implementation ("androidx.media3:media3-exoplayer:1.4.0")
. But this workaround I am using weird white overlay of video controls in native player.
this is white layer of controls on native android post integrating KMM player .
c
FYI the term KMM has been deprecated since July 2023. All multiplatform projects should be referred to as KMP
👍 1
thank you color 1
s
edited my question...