When I use MediaPlayer to play a wav file:
I got a problem:Cannot resolve method 'create(com.edu.hitsz.aircraftwar.SecondFragment, int)' I assume that this might because the wav type was wrongly recognized, so I change the associated type do like this answer:
But my problem is still not solved. What's wrong?
CodePudding user response:
The first parameter is a context, not a fragment. Use getActivity() instead of this.