While running an application, I got the following exception.
android.content.res.Resources$ResourcesNotFoundException: Resource ID # 0X7F03000a
The exception trace points to the method- setContentView(R.layout.main)
But main.xml is present in the application directory.
How can I identify the resource name from the resource ID?
Thanks in advance!
Usually when something like that happens, it’s because the build screwed up somehow so the generated R class doesn’t have it.
In Eclipse, go to
Project->Clean...and select your project. It will build your application from scratch.Also, make sure that the layout
main.xmlis in theres/layoutfolder. It must be in that folder for Eclipse to auto-generate properly.