Error: The file name must end with .xml or .png when using an mp3 file

回眸只為那壹抹淺笑 提交于 2019-11-28 14:09:55

You can't put mp3 file in drawable. Drawable folder is for images. Put your mp3 file or any other format in raw folder.

Raw folder can be found in res/raw If it doesn't exist then just create a raw folder in res folder.

Rahul Soshte

Possible cause

Another scenario causing the error might be, that you must have mistakenly pasted your whole drawable-xxxhdpi/xxhdpi/xhdpi/hdpi/mdpi folder in your drawable folder which may have resulted in cascading of drawable folder and thus giving this error.

Solution

Just go to that folder & delete the unwanted/extra folders.Then the issue will get solved.

Rushita Zalavadiya
Error:Execution failed for task ':App:mergeDebugResources'.
/Users/Zee/Repos/App/res/drawable/notification.mp3: Error: The filename must end with .xml or .png

this error occurrs when we attempt to delete all files except .xml and .png from all folders in our package.

e.g. If the assets folder has the files debug.exe and java.exe, and we want to delete them

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!