如何在MP3中注册新文件类型关联 [英] How to Register New File Type Association with MP3
问题描述
我是Android Studio的初学者.我的res\raw
文件夹中有一个MP3文件.当我sync project with Gradle files
.我得到以下对话框:
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 -> Settings -> Plugins
并搜索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屋!