错误:使用 mp3 文件时,文件名必须以 .xml 或 .png 结尾
- 作者: caddice
- 来源: 51数据库
- 2022-12-30
问题描述
我正在使用带有 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.
推荐阅读
热点文章
检查拆分键盘
0
带有“上一个"的工具栏和“下一个"用于键盘输入AccessoryView
0
Activity 启动时显示软键盘
0
UIWebView 键盘 - 摆脱“上一个/下一个/完成"酒吧
0
在 iOS7 中边缘滑动时,使键盘与 UIView 同步动画
0
我的 iOS 应用程序中的键盘在 iPhone 6 上太高了.如何在 XCode 中调整键盘的分辨率?
0
android:inputType="textEmailAddress";- '@' 键和 '.com' 键?
0
禁用 iPhone 中键盘的方向
0
Android 2.3 模拟器上的印地语键盘问题
0
keyDown 没有被调用
0
