Skip to content Skip to sidebar Skip to footer

Method Undefined Error In Android Activity

I'm trying to make a simple Android application based on a guide. I am using the code below, but it is giving me several errors. It is complaining while trying to override the onC

Solution 1:

import android.app.Activity;

publicclassCheatActivityextendsActivity {

You should extend from Activity class. Because you are just creating new class without any methods which can be overridden from parent class.

Solution 2:

As Anatol said, you have to add extends Activity.

If you didn't know that, the only method you have is implemented when extending from Activity.

I would recommend you to create Activities with your IDE's wizard. And you will avoid having to add them manually to the manifest and adding unimplemented methods.

Post a Comment for "Method Undefined Error In Android Activity"