skip to Main Content
    Caused by android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f08012e
   at android.content.res.ResourcesImpl.getResourceName(ResourcesImpl.java:253)
   at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:760)
   at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
   at android.content.res.Resources.loadDrawable(Resources.java:886)
   at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:953)
   at android.content.res.TypedArray.getDrawable(TypedArray.java:928)

I got this as error logs from firebase. It’s only happening on Nexus 5X Oreo 8.1
Also the resource for which xml ImageView is searching for is already available in these drawable folders:

  • drawable-hdpi
  • drawable-mdpi
  • drawable-xhdpi
  • drawable-xxhdpi
  • drawable-xxxhdpi

Its just a small png icon, so size isn’t the issue. The project’s min supported sdk is API Level 21 and I have already tried running it in an emulator but crash didn’t occur.

So, I need a proper fix and way of regenerating this if possible…just to check if it’s fixed or not.

Thank you!

2

Answers


  1. put icon to "drawable" folder to avoid missing icons for other screens sizez, also check if the icon is duplicated to other folders, maybe you have missing it.

    Login or Signup to reply.
  2. This issue has been elaborated throughly by Crispert here.

    The problem:

    If you’re using App Bundle (.aab) file, this issue is (probably) related to Google’s stripping suitable drawables to specific users phones. While they try to cover all screen densities, some devices are falling between the chairs and thus, not getting any resource (aren’t xhdp, xxhdp, xxxhdpi and etc). The device you mention is probably one of them.

    The solution:

    As annoying as it seems, put the resource in the "drawable" directory, as @Yuriy suggested, to indicate Google that this resource should be copied to all .apks

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search