Fatal Error: Supernotcalledexception
Could some one please help me with the issues in the below code, as I am getting did not call through super.onDestroy(), fatal error. public class MainActivity extends Activity im
Solution 1:
You should call super.onDestroy()
last in your own onDestroy()
method:
public void onDestroy(){
player.stop();
player.release();
Log.d(TAG, "Player Crushed");
super.onDestroy();
}
My hypothesis is that the MediaPlayer
requires the Activity
's context, so the Activity
must be destroyed after the calls to stop()
and release()
.
Post a Comment for "Fatal Error: Supernotcalledexception"