Message “error: resource android:attr/lStar not found”

Total
0
Shares

A Flutter Android app I developed suddenly compiled wrong today.

Error:

What went wrong:

Execution failed for task ‘:app:processDebugResources’.

Android resource linking failed
/Users/xxx/.gradle/caches/transforms-2/files-2.1/5d04bb4852dc27334fe36f129faf6500/res/values/values.xml:115:5-162:25: AAPT: error: resource android:attr/lStar not found.

error: failed linking references.

I tried

Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.

Get more help at https://help.gradle.org

The build failed in 16 seconds.


Solution

Using the answer from here
Update compileSdkVersion and targetSdkVersion to 31

And add this code snippet in your android/build.gradle file at the very end.

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

Just recently the original author of audioplayers package fixed this issue in his recent PR. It has been fixed in audioplayers version 0.20.1, so if your issue is related to audioplayers, do upgrade.

Source: StackOverflow.com

Leave a Reply

Your email address will not be published. Required fields are marked *