如何使用 MP3 注册新文件类型关联 [英] How to Register New File Type Association with MP3

查看:32
本文介绍了如何使用 MP3 注册新文件类型关联的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Android Studio 的初学者.我的 res\raw 文件夹中有一个 MP3 文件.当我将项目与 Gradle 文件同步.我得到以下对话框:

I am beginner with Android Studio. I have an MP3 file in my res\raw folder. When I sync project with Gradle files. I get the following dialog box:

如何在我的项目中允许 MP3 文件?

How do I allow for MP3 files in my project?

我读到:在 Android 中注册新文件类型,但我不是在构建 MP3 播放器.我的目的是让用户在他们的设备上安装一个 MP3 播放器.

I read this: Register new file type in Android, but I'm not building an MP3 player. My intention is for the user to have an MP3 player currently installed on their device.

我也尝试导航到 File ->设置 ->插件并为 Android Studio 搜索 MP3 播放器.

I also tried navigating to File -> Settings -> Plugins and searching for an MP3 player for Android Studio.

我应该选择Text files然后继续吗?

Should I just select Text files and move on?

我不需要 Android Studio 来播放 MP3 文件.

I do not need Android Studio to play MP3 files.

推荐答案

该窗口正是您希望 Android Studio 打开文件的方式,以便您可以可视化/收听文件.它根本不影响android如何处理文件.

That window is just how you want Android studio to open the file so you can visualize/listen to the file. It does not affect how the file is handled by android at all.

由于Android Studio 没有媒体播放器,建议您选择在关联的应用程序中打开匹配的文件这将启动您的默认音乐播放器并播放该 mp3.

Since Android Studio does not have a media player, I suggest you to select Open matching files in associated application That will launch your default music player and play that mp3.

注意:记住 res 下的所有文件只能包含小写字母、数字和下划线.如果您的 mp3 名称错误,条件将无法编译.

Note: remember that all the files under res should ONLY contain lowercase letters, numbers and underscores. If you have your mp3 with the wrong name conditions will not compile.

这篇关于如何使用 MP3 注册新文件类型关联的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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