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 ""


I was getting this exception:

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

I was calling PNG Icon from ...\app\src\main\res\drawable-21

When I put my PNG Icon into ...\app\src\main\res\drawable and I call it,
My problem goes away

BTW XML worked from \drawable-21


I had this same issue too:

As I was trying to move some files into another directory within the IDE, somehow I made a mistake by moving a layout xml file from the layout directory into the layout-land directory.

It worked after I moved it back.

Hope this helps someone.