MediaPlayer.create() always returns null

前端 未结 2 1554
别那么骄傲
别那么骄傲 2020-12-02 02:30

I have used the mediaplayer before, and I have never had this problem. Whenever I try to use MediaPlayer.create(), the method gives me null, and I can\'t play my sounds. Is

2条回答
  •  囚心锁ツ
    2020-12-02 02:48

    In my case, it was the emulator (AVD)

    Make sure that you also test it using a real Android device

    or, create a new AVD profile with better spec and newer Android version

    What seems to always work regardless of which AVD is using 128kbps mp3 audio file

提交回复
热议问题