Search code examples
androidoncreate

overrides onCreate method in android.support.v7.app.AppCompactActivity


I am new to android studio and when i am about to start ,the error is noticed by me in the below snippet.i have recognised it by an indication in android studio.U can see below image to trace out my issue.

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
    }
}

when i go through that by clicking it shows 720 errors.What might be reason behind this and how to solve.Please help me. https://i.sstatic.net/EayEp.png


Solution

  • This is standard practice. Your code should compile and run as is (judging by the screenshot at least) Are you referring to the 720 errors in the actual system's class' onCreate method? That's the Android's system inner workings and you have no reason to go there right now as a beginner.