Android SDK crash when adding video content

  • 28 May 2024
  • 2 replies
  • 121 views

Userlevel 1

Running the SDK version "15.7.0" on my pixel 8 using android 14, when adding a video attachement the SDK is crashing. 

We find this error in the field on our crash monitor tool. Summary of crash is

com.google.android.exoplayer2.ui.AspectRatioFrameLayout cannot be cast to androidx.media3.ui.AspectRatioFrameLayout

I run the dependencies of our application and Intercom is not using the `com.google.android.exoplayer2`. 

I was able to reproduce and record the crash but it look like i can’t add video to this conversation.

Let me know if you need more information

 

 


2 replies

We had similar issue with Intercom SDK versions 15.6.0, 15.8.3 and the most recent 15.9.0. But there was no information what classes are caused ClassCastException.
Our app had com.google.android.exoplayer2 dependency. We have removed it with all the code that used it and it have fixed the crash. I guess there is some dependency resolution problem or code shrinking by R8 problem if you use com.google.android.exoplayer2 and Intercom uses androidx.media3. May be specifying both dependencies in the app could help. Or migration to androidx.media3.

Userlevel 1

@Anton K12 Thanks for your help. One of our library is using com.google.android.exoplayer:exoplayer-core and adding both exoplayer and androidx.media3:media3-exoplayer solved the issue.

Reply