开发者

Why doesn't R.raw.'songname' not work on android devices?

开发者 https://www.devze.com 2022-12-28 10:24 出处:网络
I have some media (Audio tracks) on an app, with file path \'R.raw.test\'. I use some code to get it into a mediaplayer:

I have some media (Audio tracks) on an app, with file path 'R.raw.test'.

I use some code to get it into a mediaplayer:

MediaPlayer.create(Textbox.this, R.raw.fly);

And it works PERFECTLY on the Android Emulator (plays track on click of button).

Why, when I put it on my Archos (5 IT) it doesn't work at all?

As soon as the button is clicked, it crashes. Do开发者_Python百科 you have to do something to file paths or what?


Have a look to this thread.
MediaPlayer.create(Textbox.this, R.raw.fly); should work on your Archos.

0

精彩评论

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