android:attr/lStar not found Android Origin: On your device Last updated 13 Oct 2026

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

A dependency (androidx.core 1.7+) uses an attribute from Android 12 (API 31), but your module compiles against an older compileSdk.

Exact message you may see resource android:attr/lStar not foundAndroid resource linking failed
Seen on: Android

Meaning

Usually a transitive dependency upgraded androidx.core. Raising compileSdk to 31+ fixes it; forcing an older androidx.core is a workaround.

Common causes

  • compileSdk below 31 with androidx.core 1.7+
  • Plugin/library module compiled with old compileSdk (Flutter/RN plugins)

⚡ Quick fix

  1. Set compileSdk 31+ in all modules
  2. Force compileSdk for subprojects in the root build file
  3. Pin androidx.core to an older version as a last resort

Detailed fix by platform

Gradle

  1. kotlin
    subprojects {
      afterEvaluate {
        extensions.findByName("android")?.let { (it as com.android.build.gradle.BaseExtension).compileSdkVersion(34) }
      }
    }

How to diagnose

  1. compileSdk — Of the failing module
  2. Dependency — Which pulls androidx.core?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

ActivityNotFoundException — ActivityNotFoundException: Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml? (Android)ActivityNotFoundExcep…Android resource linking failed — AAPT: error: resource x (aka y) not found — Android resource linking failed (Android)Android resource link…BadTokenException — WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? (Android)BadTokenExceptionCalledFromWrongThreadException — CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views (Android)CalledFromWrongThread…Can not perform this action after onSaveInstanceState — IllegalStateException: Can not perform this action after onSaveInstanceState (fragment transaction) (Android)Can not perform this …Cannot access database on the main thread — Room: Cannot access database on the main thread since it may potentially lock the UI for a long period of time (Android)Cannot access databas…Cannot fit requested classes in a single dex file — Cannot fit requested classes in a single dex file (# methods: 65536 > 65536) — mergeDex failed (Android)Cannot fit requested …Could not resolve — Gradle: Could not resolve all files for configuration / Could not resolve dependency (Android)Could not resolveandroid:a…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.