错误:使用 mp3 文件时,文件名必须以 .xml 或 .png 结尾 [英] Error: The file name must end with .xml or .png when using an mp3 file

查看:25
本文介绍了错误:使用 mp3 文件时,文件名必须以 .xml 或 .png 结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有 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 结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆