Import Android.support.v7.app.appcompatactivity Ошибка
//if you are using androidx......
import android.support.v7.app.AppCompatActivity;
//to
import androidx.appcompat.app.AppCompatActivity;
Innocent Ibis