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.68k stars 402 forks source link

InflateException: Binary XML file line #21: Error inflating class androidx.media3.ui.PlayerView #309

Closed appsapiconsole closed 1 year ago

appsapiconsole commented 1 year ago

Media3 Version

Media3 1.0.0

Devices that reproduce the issue

I m facing bug in PlayerControlView line # 422

image

while inflating R.layout.exo_player_control_view line # 64

image

after style code review. I found some mistake in ExoStyledControls.Button.Bottom.VR (@drawable/exo_styled_controls_vr)

image

these icons are in drawable-v4 folder

image

move these icon to simple drawable folder will solve this issue.

InflateException: Binary XML file line #21: Error inflating class androidx.media3.ui.PlayerView

Caused by android.view.InflateException: Binary XML file line #64: Error inflating class ImageButton at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.inflate(LayoutInflater.java:479) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at androidx.media3.ui.PlayerControlView.(PlayerControlView.java:422) at androidx.media3.ui.PlayerView.(PlayerView.java:455) at androidx.media3.ui.PlayerView.(PlayerView.java:276) at java.lang.reflect.Constructor.newInstance(Constructor.java) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414)

image

image

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

No

Reproduction steps

Its happening in live app after enabling proguard. shrinkResources true minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

Expected result

app should play video.

Actual result

app crash

Media

not in demo app

Bug Report

icbaker commented 1 year ago

This is likely happening because you're distributing your app in App Bundles and users are incorrectly/incompletely sideloading it. See https://github.com/google/ExoPlayer/issues/10409#issuecomment-1327428721.

Closing as a duplicate of https://github.com/google/ExoPlayer/issues/10409