This kind of error happened once to me, but with a string resource. I had the string configured in a translation file, but not in the default string resource file, so this produced the crash.
Make me correct If I am not wrong...
I think you have the same name of your library and module in your project so you have to rename one of them then its work fine
I had this issue when using viewBinding. Class name was SearchViewHolder and layout resourse name was search_view_holder. That caused confusion and crash.
Check if your xml is in same module/package/project where you have written the logic to show the code.
In my case my xml was in different module which was not accessible.