I have an audio file with extension .mp3, I wanted to add it to "raw" folder in Android studio, in order to access it from my java file like:
Intent objIntent = new Intent(this, PlayAudio.class);
I see question mark on my audio file in raw folder and whenever I click on it, it shows me a screen with this message:
The file 'xy.mp3' is not associated with any file type.Please define the association
Any suggestion?
I had this too the other day, trying to find out which file type can be associated. Then I just realized that the file name of your .mp3 should be all lowercase. AS cannot recognize files with uppercase letters in file name, I changed it, and it runs just fine. Not sure if that's your case too.
The problem was that, I was dragging .mp3 file into raw folder in Android Studio, as I was doing it in Eclips, but in Eclips I hadn't encountered such issue. So what I did was:
I opened my project folder:
C:\Users\xyx\AndroidStudioProjects\PlayAudio\app\src\main\res\raw
and past my .mp3 file in raw folder, and now I don't see any question mark on my audio file in raw folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With