zee zee - 1 year ago 1010
Android Question

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

I'm using Gradle 1.5.0 with Android Studio. Project syncs with Gradle without any issues, but when I run the app, I get the follow error message

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

Using an mp3 file, so not sure what to do at this point. Any help is much appreciated.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download