[英]“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.mp3
、 s2.mp3
、 s3.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.