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

前端 未结 4 1862
粉色の甜心
粉色の甜心 2020-12-12 01:25

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:Execu         


        
相关标签:
4条回答
  • 2020-12-12 02:18

    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.

    0 讨论(0)
  • 2020-12-12 02:20
    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

    0 讨论(0)
  • 2020-12-12 02:24

    enter image description hereI

    I had .zip file containing grandle files, in `res/drawable" folder. Then I deleted it from the "drawable" directory. It worked for me...

    0 讨论(0)
  • 2020-12-12 02:26

    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.

    0 讨论(0)
提交回复
热议问题