0

I have the following problem, while the self compilation of this class did encounter the following error " could not resolve symbol 'AppCompatActivity' "

import android.support.v7.app.AppCompatActivity; 
import android.os.Build;
import android.os.Bundle;
import android.view.ViewGroup;
import java.lang.reflect.Array;
import java.util.ArrayList;

   @Override
      protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main_activity);
      }
Ouwdin XM
  • 1
  • 1
  • Hi, and welcome. Take a look at https://stackoverflow.com/questions/29199891/cannot-resolve-symbol-appcompatactivity , there's a lot of activity there and an accepted answer, maybe something from there helps. – Dr. Spam Oct 01 '20 at 22:55

1 Answers1

0

Did you try with androidx AppCompatActivity?

import androidx.appcompat.app.AppCompatActivity

rogalz
  • 80
  • 8
  • You propably have to migrate to androidx. You can find this option at Refactor. – rogalz Oct 01 '20 at 18:04
  • yes, I did try this option but the class couldn't show up well functioning without an error. I'm trying now with the migration of androidx into the code, while having fewer ideas about where I could find it inside of the Refractor Panel that's popping in front of me now – Ouwdin XM Oct 09 '20 at 15:08