For Android Studio I had this same problem. It was caused by running from linux, meaning the files did not automatically receive an extension. By manually adding .png to the end of the filenames it could recognize the filetype and load accordingly.
Android studio might throw a hissy fit if you try to refactor rename inside the project, because android will try to regenerate R immediately. I do not know exactly what causes the error as it points to some seemingly random line of code, which in my case was a comment.
Solution to that: Delete from drawable, rename outside of the project and throw them in again.