[Solved] Compile Error: AAPT: error: resource android:attr/lStar not found

Question

When using a third-party library, an error is reported during compilation

C:\Users\Administrator\.gradle\caches\transforms-2\files
2.1\b29f469d834fe6ac53c0c0e264e4ef98\core-1.7.0\res\values\values.xml
:105:5-114:25: AAPT: error: resource android:attr/lStar not found.

reason

Compatibility problems have caused the project to be compiled. However, the core-1.7.0 version is used in the third party library and core-1.6.0 is used in the project.

Solution:

Add the following code above dependencies{} in build.gradle

configurations.all {
    resolutionStrategy {
        force 'androidx.core:core:1.6.0'
    }
}

dependencies {
}

Read More: