I am loading mp3 files to play in an Android game based on AndEngine. When I package my game as an APK, mp3 audio in the assets folder throws the error \"can not be opened a
The problem seems to be related to the mediaPlayer.prepare() method in the MusicFactory.java of AndEngine. I've just comment out line 91 (as in the following code snipet) and the MP3 resource was loaded without any exceptions. I think the same can be done with the asset loading method.
public static Music createMusicFromResource(final MusicManager pMusicManager, final Context pContext, final int pMusicResID) throws IOException {
final MediaPlayer mediaPlayer = MediaPlayer.create(pContext, pMusicResID);
**//mediaPlayer.prepare();**
final Music music = new Music(pMusicManager, mediaPlayer);
pMusicManager.add(music);
return music;
}