default types in Android Studio

1

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?

danek

Posted 2014-08-28T08:46:27.593

Reputation: 11

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 – 2014-08-28T08:58:06.480

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 – 2014-08-28T09:03:49.443

2I 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 – 2014-08-29T09:11:10.307

I'm now getting the same issue, but synchronizing the files don't have any effect. – Wayneio – 2015-08-19T11:03:51.750

Answers

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.

Renan Rodrigues

Posted 2014-08-28T08:46:27.593

Reputation: 1

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.

Wayneio

Posted 2014-08-28T08:46:27.593

Reputation: 115