Android studio 出错(方法未覆盖其超类中的方法)

Error on Android studio ( Method doesn't override method from its superclass )

package com.example.mahaapptask2;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
// Here we link the btn with the activty in xml file
        Button btnHello = findViewById(R.id.btnHello);
        btnHello.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v)
            {
            System.out.println("Hello :)");
            }
        });

    }
}

在运行 phone 模拟器之后出现这个错误 (方法不会覆盖其超类中的方法)所以我必须更改什么?

尝试在导入部分添加这一行:import com.example.mahaapptask2.R;