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

查看:211
本文介绍了错误:使用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中. Drawable文件夹用于图像.将您的mp3文件或其他任何格式放在原始文件夹中.

You can't put mp3 file in drawable. Drawable folder is for images. Put your mp3 file or any other format in raw folder.

可以在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天全站免登陆