Error: Package android.support.annotation does not exist

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.

Guess you like

Origin blog.csdn.net/anfenggang/article/details/130966216