androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.57k stars 374 forks source link

Binary XML file line #64 in cricket.live.line:layout/exo_player_control_view: Binary XML file line #64 in cricket.live.line:layout/exo_player_control_view: Error inflating class android.widget.ImageButton #1596

Closed ayushi-sk closed 1 month ago

ayushi-sk commented 1 month ago

Version

Media3 main branch

More version details

No response

Devices that reproduce the issue

Android 8, 13 and 14

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

      Fatal Exception: android.view.InflateException: Binary XML file line #64 in cricket.live.line:layout/exo_player_control_view: Binary XML file line #64 in cricket.live.line:layout/exo_player_control_view: Error inflating class android.widget.ImageButton

Expected result

No crash

Actual result

No crash

Media

@Composable @androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class) fun rememberPlayerView(player: Player, isTweet: Boolean = false): PlayerView { val context = LocalContext.current val playerView = remember { PlayerView(context).apply { layoutParams = ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) useController = false setBackgroundColor(Color(0xFF010101).toArgb()) resizeMode = if (isTweet) AspectRatioFrameLayout.RESIZE_MODE_FIT else AspectRatioFrameLayout.RESIZE_MODE_ZOOM setShowBuffering(PlayerView.SHOW_BUFFERING_NEVER) this.player = player } } DisposableEffect(key1 = player) { playerView.player = player onDispose { playerView.player = null } } return playerView }

icbaker commented 1 month ago

[x] You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

We didn't receive this, please can you re-send it with the subject Issue #1596? Thanks!

ayushi-sk commented 1 month ago

I don't have that.

icbaker commented 1 month ago

Without further info, this looks like a duplicate of the stack trace in https://github.com/androidx/media/issues/309 which is itself a duplicate of https://github.com/google/ExoPlayer/issues/10409 and is caused by people incompletely sideloading your APK. If you're seeing this in a metrics dashboard like crashlytics, and can't reproduce locally, I suspect that's what's happening here too.