Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

audio

I am creating an Android App that has sound files in the res/raw folder. 50 of them. They are all named s1.mp3, s2.mp3, s3.mp3 etc.

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. 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. I then moved all files after s36.mp3 away and it then pointed to s12.mp3 as the problem.

So obviously the Android Studio sees a problem with all of the sound files' names. 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). Of course this cannot be the problem, right?

like image 400
Jans Rautenbach Avatar asked Mar 19 '23 04:03

Jans Rautenbach


1 Answers

I saw your image and you have a file called s30.MP3, remember FILES MUST CONTAIN ONLY [a-z0-9_.]“ -

the file s30.MP3 must be renamed to s30.mp3

like image 121
Jorgesys Avatar answered Apr 27 '23 09:04

Jorgesys