开发者

Android, upgraded existing project to sdk2.3, now get null pointer

I upgraded to the 2.3 sdk today, and then changed my project build target to 2.3 and did a clean and build. When I run it on a 2.2 device I get a null pointer exception on this line:

mSoundPool.play(index, streamVolume, streamVolume, 1, 0, speed);

Which worked fine with the 2.2 sdk, is the something I'm doing wrong or not doing that I need to in order to properly upgrade my project's build target?

This is how it's initialized:

mSoundPool = new SoundPool(4, AudioMana开发者_Python百科ger.STREAM_MUSIC, 0);


My guess would be that mSoundPool object is null, so we'd need to see how you construct it.


Found that a full clean build fixed the problem. Its a bit sketchy since I had cleaned the build once already, the second time fixed the problem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜