問題描述
我正在使用帶有 Android Studio 的 Gradle 1.5.0.項目與 Gradle 同步沒有任何問題,但是當我運行應用程序時,我收到以下錯誤消息
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
使用 mp3 文件,所以現在不知道該怎么做.非常感謝任何幫助.
Using an mp3 file, so not sure what to do at this point. Any help is much appreciated.
推薦答案
你不能把mp3文件放到drawable中.可繪制文件夾用于圖像.將您的 mp3 文件或任何其他格式的文件放在 raw 文件夾中.
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 文件夾位于 res/raw
如果它不存在,那么只需在 res
文件夾中創建一個 raw
文件夾.
Raw folder can be found in res/raw
If it doesn't exist then just create a raw
folder in res
folder.
這篇關于錯誤:使用 mp3 文件時,文件名必須以 .xml 或 .png 結尾的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!