Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The file is not associated with any file type.Please define the association

Tags:

android

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?

like image 665
Jaans Avatar asked Dec 21 '14 15:12

Jaans


2 Answers

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.

like image 115
Naomi Avatar answered Sep 21 '22 00:09

Naomi


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

like image 45
Jaans Avatar answered Sep 19 '22 00:09

Jaans