Getting Android.Content.Res.Resources$Notfoundexception: Exception Even When the Resource Is Present in Android

Getting android.content.res.Resources$NotFoundException: exception even when the resource is present in android


  1. in eclipse, go to Project > Clean...
  2. select your project, then press OK
  3. relaunch the app

if it happens again delete the r.java file. it will generate automatically.

How to fix android.content.res.Resources$NotFoundException: Resource ID #0x7f060056

Try to clean and rebuild your project.

If that doesn't work, use this code to set the background

linearLayout.setBackground(ContextCompat.getDrawable(this, R.drawable.img1))

By the way, next time you should post the code directly instead of passing in a link.

Android Resources$NotFoundException: Resource ID #0x7f030027

You can check your R file for Resources$NotFoundException: Resource ID #0x7f030027. It'll tell you which resource was creating the problem. As an alternative solution I think you might have setText or any content just an int.And as you know here compiler will look for corresponding resource value. So, just concat an empty string there as ""

Fatal Exception: android.content.res.Resources$NotFoundException Resource ID #0x7f07008d

Can you confirm if this belongs to only Android OS 5 and 5.1, if yes then it seems to be a bug with androidx.appcompat 1.1.0
Ref: - https://issuetracker.google.com/issues/141132133

Try downgrading to androidx.appcompat:appcompat:1.0.2 once if it gets resolved

Resources - NotFoundException when accessing literals

OK, the problem was in the gradle for the app module. There was a resConfig "zz" than can lead to this. Removing this line avoids all translation problems

android.content.res.Resources$NotFoundException: Resource ID #0x7f07006e

Your problem is the wrong placement of resources(images).
You use (API 23) but resources for API 23 is null, because they only API 24 and up.

Sample Image

Now all images marked (v24) this means that they are in drawables-v24 just move in drawable

Sample Image

that'll solve your problem.

Can't fix android.content.res.Resources$NotFoundException

Creating a new Basic activity that has a bottom navigation menu by default somehow corrupted the list of images I had. I still don't know the reason.

What I did to fix the error was to use List.clear(); in every arraylist I had, and then remake them.

I had to do this because they were saved on gson, so I had to reset them, save them, and then remake the list.



Related Topics



Leave a reply



Submit