Today I imported an Android Demo project, and many "error: package android.support.annotation does not exist" errors occurred during compilation.
The reason is that the installed version does not match.
solution:
Change the import package statement to the following:
import androidx.annotation.IntDef; import androidx.annotation.RequiresApi;
problem solved.