1

I have just written this code in Android Studio:

MediaPlayer mPlayer = MediaPlayer.create(this, R.raw.OOO);
mPlayer.start();

Before this I added a new folder "raw" and put the file "OOO".mp3 in it. When I launched my program, The Android Studio said something like this:Choose a file type for type *mp3, and there were a lot of types like these: html files, properties files and things like that.

Being confused what to choose, chose the second radiobutton. There was a text on it:use matched associated program, something like that.

Then, I pressed "next", and Windows Media Player was opened, and my mp3 was played! And now, everytime I launch my project, Windows media player launches and my project does not starts in Emulator! How can I return my settings back?

4
  • But today, i dont now why, all are good! Emulator starts, Media player Windows does not start! But still, thanks! Maybe someone of you knows what it was.
    – danek
    Commented Aug 28, 2014 at 8:58
  • Promlem came again! When i add a new mp3 file, just the same happens! Wnindows Media Player starts, and that`s all. Please, help!
    – danek
    Commented Aug 28, 2014 at 9:03
  • 2
    I managed with this problem! Decision is:When you add a new mp3 file, you should press the mouse's right button on it and choose "Synchronize" button! After this, your program will launch in Android Emulator, not in the Windows Media Player.
    – danek
    Commented Aug 29, 2014 at 9:11
  • I'm now getting the same issue, but synchronizing the files don't have any effect.
    – Wayneio
    Commented Aug 19, 2015 at 11:03

2 Answers 2

0

I've just had the same problem. What fixed it was partially syncing, as you say. But that won't work if there is an error with the files. I didn't pick up on it at first, but in the console it mentioned that audio files can not have uppercase letters to start. Changing the file to lowercase and syncing fixed the issue.

0

To fix it, I needed to create a new Android Resource Directory into the directory "res". I called it "raw". So I pasted the .mp3's file into it, and the problem was solved.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .