开发者

problem to play sound

开发者 https://www.devze.com 2023-03-25 07:18 出处:网络
i have develop one appl开发者_运维问答ication(in 1.5) in which 2 activity stay there. in first activity i have put background sound.and in second activity i have put animal sound.now when i am play it

i have develop one appl开发者_运维问答ication(in 1.5) in which 2 activity stay there. in first activity i have put background sound.and in second activity i have put animal sound.now when i am play it in emulator it work fine but when i have test it in android device version 2.1,i got force close error.

Take action:

  1. while i have remove background sound and continue with animal sound it work fine in device.
  2. while i have remove animal sound and continue with background sound it work fine in device.
  3. set rebuild automatically.
  4. clean it again and again.

I cant able to get exactly what error are raise, because it is happen only in device.

i have use to play sound ::

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


may be

mPlayer = MediaPlayer.create(this, R.raw.touch_and_show);
mPlayer.prepare();
mPlayer.start();
0

精彩评论

暂无评论...
验证码 换一张
取 消