简体   繁体   English

"“无效的文件名:必须仅包含 [a-z0-9_.]”,用于 Android Studio 中的声音文件"

[英]“INVALID FILE NAME: MUST CONTAIN ONLY [a-z0-9_.]“ for sound files in Android Studio

I am creating an Android App that has sound files in the res/raw folder.我正在创建一个在res/raw文件夹中有声音文件的 Android 应用程序。 50 of them.其中50个。 They are all named s1.mp3 , s2.mp3 , s3.mp3 etc.它们都被命名为s1.mp3s2.mp3s3.mp3等。

I have done some searches and found that everyone getting this error only gets it because their file has a capital letter in it.我进行了一些搜索,发现每个收到此错误的人都只会收到它,因为他们的文件中有一个大写字母。 Mine doesn't.我的没有。

The error started by specifically pointing out that s37.mp3 had the incorrect file name.该错误首先指出s37.mp3的文件名不正确。 I then moved that file away completely, thinking that it had a bug or something.然后我把那个文件完全移开,认为它有一个错误或什么。 When I tried to recompile, it said s38.mp3 had the problem.当我试图重新编译时,它说s38.mp3有问题。 I then moved all files after s36.mp3 away and it then pointed to s12.mp3 as the problem.然后我将s36.mp3之后的所有文件移走,然后它指出s12.mp3是问题所在。

So obviously the Android Studio sees a problem with all of the sound files' names.所以很明显,Android Studio 发现所有声音文件的名称都有问题。 When I look at the navigation bar on the left of the screen, I see that all the sound files have their regular names, but their extensions are in caps (.MP3).当我查看屏幕左侧的导航栏时,我看到所有声音文件都有它们的常规名称,但它们的扩展名都是大写字母 (.MP3)。 Of course this cannot be the problem, right?当然这不可能是问题,对吧?

I saw your image and you have a file called s30.MP3 , remember FILES MUST CONTAIN ONLY [a-z0-9_.] “ - 我看到你的图像,你有一个名为s30.MP3的文件,请记住FILES MUST CONTAIN ONLY [a-z0-9_.] “ -

the file s30.MP3 must be renamed to s30.mp3 必须将文件s30.MP3重命名为s30.mp3

File names must be lowercase az or underscore.文件名必须是小写的 az 或下划线。 Hope this helps anyone else.希望这对其他人有帮助。

"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无效的文件名:必须仅包含[a-z0-9_。] - Invalid file name: must contain only [a-z0-9_.] 出现错误错误:res / menu / mainMenu.xml:无效的文件名:必须仅包含[a-z0-9_。] - getting error Error:res/menu/mainMenu.xml:invalid file name:must contain only[a-z0-9_.] res \ layout \ Contact_us.xml:文件名无效:必须仅包含[a-z0-9_。] - res\layout\Contact_us.xml: Invalid file name: must contain only [a-z0-9_.] java android:res \\ drawable-hdpi \\ Restaurant-Blue-2-icon.png:无效的文件名:必须仅包含[a-z0-9_。],无法修复 - java android: res\drawable-hdpi\Restaurant-Blue-2-icon.png: Invalid file name: must contain only [a-z0-9_.], cant fix 为什么android xml文件名必须只包含小写字母和数字([a-z0-9_。])? - Why android xml file name must contains only lowercase letters and digits ([a-z0-9_.])? Android Studio 解决方法:基于文件的资源名称必须仅包含小写 az、0-9 或下划线 - Android Studio Workaround: File-based resource names must contain only lowercase a-z, 0-9, or underscore Android Studio 文件名必须以.xml结尾 - Android Studio File name must end with .xml Android Studio 中 jpg 文件的“文件名必须以 .xml 结尾”错误 - “the file name must end with .xml” error for jpg file in Android Studio android工作室。 错误:文件名必须以.xml结尾 - android studio. Error: The file name must end with .xml Android Studio - - 只有1个按钮在MainActivity中播放声音 - Android Studio - - Only 1 button plays sound in MainActivity
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM