This is one of the problems I have recently encountered. This was a kind of misleading mistake for me and kept me at a standstill for about 30 minutes this morning. It's not that Android cannot find the class. This is due to the fact that he was having problems importing the original image file.
Now, the reason he has problems finding the image is because I did not copy the original image to the directory correctly. I decided to drag the source file from another folder directory to the appropriate places. However, he did not copy the file properly. Or he copied it as a link to another resource.
As a result, Android does not know what to do with the resource and throws this odd error. To solve this problem, you need to remove the old image sources and then replace them with direct full copies of their equivalents. Then you should see that this error disappears and the application works as expected from the xml layout code.
source share