With API 28 and "androidx.appcompat" library project says "AppCompatActivity" symbol not found

you should replace the target class.

eg.

import android.support.v7.app.AppCompatActivity;

replace to :

import androidx.appcompat.app.AppCompatActivity;

Edit: Now you can easily migrate your project to androidx, Just click Refactor => Migrate to Androidx from menubar. enter image description here

Previously I did as follow.
With Clean and build and Rebuild project android studio did not clean the unused imports like imports from android.support.v7 so I removed them all manually from all activities. Now android studio suggests AppCompatActivity from the correct library androidx.appcompat.

Hope so it will help someone.


Add Below lines in your gradle Properties:

android.useAndroidX=true android.enableJetifier=true

This will upgrade your project into Android X.