I am trying to add sounds to my project, but android studio does not recognize these files. The file has a question mark icon before it and if i play the project, the following screen appears:
any way to solve this?
I am trying to add sounds to my project, but android studio does not recognize these files. The file has a question mark icon before it and if i play the project, the following screen appears:
any way to solve this?
Select the 'Archive' option and be sure the syntax of the filename is right (only lowercase a-z, 0-9, or underscore).
Any file added to the raw folder will have a '?' over it, although that doesn't mean Android Studio doesn't recognize the file.
If you need to open the file after importing it into Android Studio, select 'groovy' in the 'Register New File Type Association' window that pops up, and make sure that the 'Open matching files in associated application' option is selected before pressing 'OK.' This will cause Window's Groovy application to open your mp3 file when you select it.
If you accidentally select an option other than groovy, or forget to choose the '...associated application' option, you can undo your action by going File -> Settings -> "associate" -> File Types -> (the file type you selected) -> .mp3 -> '-' -> OK
Later, when you call R.raw.soundFile
Android Studio should recognize it.
Hope this helps.
MP3 files not recognizing in Android Studio.
Zingaat.mp3
to zin_gaat.mp3
.mp3
extension from the
file.Choose "open matching files in associated application" and don't worry about the question mark besides the name of your sound.