问题描述
我正在使用带有 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.