Caused by android.content.res.Resources$NotFoundException Drawable (missing name) with resource ID #0x7f08009c
See original GitHub issueExoPlayer Version
2.16.1
Devices that reproduce the issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
No
Reproduction steps
1 in PlayerView Construct(), will create PlayerControlView
public PlayerView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { this.controller = new PlayerControlView(context, null, 0, attrs); }
2 in PlayerControlView, will infate View with layout
public PlayerControlView() { int controllerLayoutId = R.layout.exo_player_control_view;
3 in exo_player_control_view xml layout, has ImageButton
<ImageButton android:id="@id/exo_prev" style="@style/ExoMediaButton.Previous"/>
4 which sytle is
</style> <style name="ExoMediaButton.Previous"> <item name="android:src">@drawable/exo_controls_previous</item> <item name="android:contentDescription">@string/exo_controls_previous_description</item> </style>
the problem is that the exo_controls_previous drawable could’t be fond。 help me how to resolve this problem!
Expected result
not crash
Actual result
Caused by android.content.res.Resources$NotFoundException Unable to find resource ID #0x7f08009c android.content.res.ResourcesImpl.getResourceName (ResourcesImpl.java:294) android.content.res.ResourcesImpl.loadDrawableForCookie (ResourcesImpl.java:994) android.content.res.ResourcesImpl.loadDrawable (ResourcesImpl.java:729) android.content.res.Resources.loadDrawable (Resources.java:1096) android.content.res.TypedArray.getDrawableForDensity (TypedArray.java:1006) android.content.res.TypedArray.getDrawable (TypedArray.java:981) android.widget.ImageView.<init> (ImageView.java:212) android.widget.ImageButton.<init> (ImageButton.java:96) android.widget.ImageButton.<init> (ImageButton.java:92) android.widget.ImageButton.<init> (ImageButton.java:88) java.lang.reflect.Constructor.newInstance0 (Constructor.java) java.lang.reflect.Constructor.newInstance (Constructor.java:343) android.view.LayoutInflater.createView (LayoutInflater.java:852) android.view.LayoutInflater.createView (LayoutInflater.java:774) com.android.internal.policy.PhoneLayoutInflater.onCreateView (PhoneLayoutInflater.java:58) android.view.LayoutInflater.onCreateView (LayoutInflater.java:928) android.view.LayoutInflater.onCreateView (LayoutInflater.java:948) android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:1002) android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:959) android.view.LayoutInflater.rInflate (LayoutInflater.java:1121) android.view.LayoutInflater.rInflateChildren (LayoutInflater.java:1082) android.view.LayoutInflater.rInflate (LayoutInflater.java:1124) android.view.LayoutInflater.rInflateChildren (LayoutInflater.java:1082) android.view.LayoutInflater.inflate (LayoutInflater.java:680) android.view.LayoutInflater.inflate (LayoutInflater.java:532) android.view.LayoutInflater.inflate (LayoutInflater.java:479) com.google.android.exoplayer2.ui.PlayerControlView.<init> (PlayerControlView.java:421) com.google.android.exoplayer2.ui.PlayerView.<init> (PlayerView.java:498) com.google.android.exoplayer2.ui.PlayerView.<init> (PlayerView.java:318) com.google.android.exoplayer2.ui.PlayerView.<init> (PlayerView.java:314) com.****.MainActivity.onCreate (MainActivity.java:74) android.app.Activity.performCreate (Activity.java:8207) android.app.Activity.performCreate (Activity.java:8191) android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1309) android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3808) android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4011) android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:85) android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135) android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95) android.app.ActivityThread$H.handleMessage (ActivityThread.java:2325) android.os.Handler.dispatchMessage (Handler.java:106) android.os.Looper.loop (Looper.java:246) android.app.ActivityThread.main (ActivityThread.java:8633) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
Media
no others
Bug Report
- You will email the zip file produced by
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Are there any solutions or workarounds yet? I’m getting this crash from 2 different apps’s crashlytics already.
Same issue here, not happening very often but for a few users (~0.1%, with different device manufacturers and OS versions, no apparent pattern there)
however, in my case compared to the one above, the video player is embeded into some other component of mine, so the XML looks like:
and the
PlaytomicVideoView
instantiated the Exo player inside aFrameLayout
with: