Android.app.supernotcalledexception: Activity Did Not Call Through To Super.oncreate()
Here is my Android Media player code. I don't know what I am missing in this code, when I run with breakpoint at line MediaPlayer mp = new MediaPlayer() in Debug mode. All the file
Solution 1:
You didn't call the Activity
's onCreate()
method, i.e the super class' one. Add the call to MainActivity
's onCreate()
method:
public class MainActivity extends Activity {
private MediaPlayer mp;
private static final String MAIN_TAG ="ERROR";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); // this line is missing
// your code below ...
Post a Comment for "Android.app.supernotcalledexception: Activity Did Not Call Through To Super.oncreate()"