Dan Belden
Dan Belden

Reputation: 1217

android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x7f010076 a=2}

Apologies if this is a duplicate, I did try and find any similar answers first and failed as nothing seemed to refer to ImageView? I'm not an Android dev, but we are seeing issues with our app on older OS versions!

Stack trace:

02-20 09:56:15.885  11529-11529/com.octer E/AndroidRuntime﹕ FATAL EXCEPTION: main
android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x7f010076 a=2}
        at android.content.res.Resources.loadDrawable(Resources.java:2063)
        at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
        at android.view.View.<init>(View.java:3364)
        at android.widget.ImageView.<init>(ImageView.java:121)
        at android.widget.ImageButton.<init>(ImageButton.java:87)
        at com.android.internal.view.menu.ActionMenuPresenter$OverflowMenuButton.<init>(ActionMenuPresenter.java:556)
        at com.android.internal.view.menu.ActionMenuPresenter.initForMenu(ActionMenuPresenter.java:99)
        at com.android.internal.view.menu.MenuBuilder.addMenuPresenter(MenuBuilder.java:216)
        at com.android.internal.widget.ActionBarView.configPresenters(ActionBarView.java:483)
        at com.android.internal.widget.ActionBarView.setMenu(ActionBarView.java:448)
        at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:405)
        at com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:775)
        at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:198)
        at android.os.Handler.handleCallback(Handler.java:730)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5103)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
        at dalvik.system.NativeStart.main(Native Method)

I did discover this post on the internet but none of the solutions seems to have fixed anything. The problem is the code builds and runs on Nexus 5, but not on older model phones.

Debug resource not found website

Upvotes: 0

Views: 8934

Answers (2)

Adhiambo Oyier
Adhiambo Oyier

Reputation: 235

I fixed this error by moving my drawable from

app\src\main\res\drawable-v24

to

app\src\main\res\drawable

Upvotes: 1

Dan Belden
Dan Belden

Reputation: 1217

For all those interested, our issue was resolved when removing the following parent attribute, from one of our tags:

parent="@style/Widget.AppCompat.ActionButton.Overflow"

It's a pretty horrendous stack-trace, which didn't resolve to any logical location - we managed to isolate it after many hours of (Delete, build, delete, build...etc)

<style name="OcterActionBarOverflowButton">

Hope this helps!

Upvotes: 5

Related Questions