I have had this in two cases. When there were invalid characters in the resource name and when there was an error in the code.
I recommend checking the names of all sprites, fonts, music and other files that are in the project, even if you do not use them in the code. Use only Latin, numbers and underscores instead of spaces.
Also, review your code, perhaps somewhere there is an unobvious error.