Error: package Does not exist

I see a lot of posts online, are written half, not specific enough, or do not fit, I tried a lot of myself, finally got the solution.


Android studio 3.5.1 track of

the JDK 1.8 com. The Android. View the build: gradle: 3.5.1 track of migration to the
project androidx

step 1: check to see if build.gradle is configured

search build. If there is a keyword in gradle com. Android. Support: support - annotations
if not, you need to add configuration, the steps as shown in figure

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation ""

modifier error file

view the file with the error and modify the import package.


import androidx.annotation.IntDef;
import androidx.annotation.WorkerThread;

Ctrl + Shift + R

import android. Support. The annotation.
import androidx. The annotation.

synchronization project Sync

Read More: