AAPT: error: resource android:attr/lStar not found

Table of contents

step1: Increase the kotlin plugin version

step2: set configurations.all

step3: Improve ktolin version to 1.7.0

step4: increase compileSdkVersion and targetSdkVersion to 31


This error is mainly caused by the problem of kotlin version.

step1: Increase the kotlin plugin version

Root directory build.gradle, improve kotlin-gradle-plugin version to:

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"

step2: set configurations.all

Root directory build.gradle

configurations.all {
    resolutionStrategy {
        force 'androidx.core:core-ktx:1.7.0'
    }
}

step3: Improve ktolin version to 1.7.0

build.gradle in the app directory

implementation 'androidx.core:core-ktx:1.7.0'

step4: increase compileSdkVersion and targetSdkVersion to 31

Guess you like

Origin blog.csdn.net/mldxs/article/details/127482817