Skip to content

Android build errorAndroid: “error: resource android:attr/lStar not found” (Flutter, React Native)

The release or debug build stops in a resource-linking task with error: resource android:attr/lStar not found. A dependency, usually a newer androidx.core, uses an attribute that only exists from Android API level 31, and the module being compiled still uses an older compileSdk. In Flutter it is often an old plugin with its own compileSdk 30.

Short answer

Raise compileSdk to a current level (Flutter: compileSdk = flutter.compileSdkVersion in android/app/build.gradle). Read the failing task name: if it is :some_plugin:verifyReleaseResources, that plugin pins an old compileSdk; upgrade the plugin, or override its compileSdk from android/build.gradle until it is updated.

Why the attribute is missing, and the fix

  1. 01

    The app module compiles against an old SDK

    “lStar Added in API level 31” Android Developers, R.attr

    compileSdk only decides which Android APIs the build can see; it doesn’t change which devices can install the app. Raise it to the level Flutter or your Android Gradle plugin uses.

    // android/app/build.gradle.kts
    android {
        compileSdk = flutter.compileSdkVersion   // or a number such as 36
    }
  2. 02

    An old Flutter plugin pins compileSdk 30 or lower

    When the failing task names a plugin (for example :uni_links:verifyReleaseResources), the app setting is fine and the plugin is behind. Upgrade it with flutter pub upgrade, or replace it if it is abandoned. If you must keep it, fork it and raise compileSdk in the plugin’s own android/build.gradle, then point pubspec.yaml at the fork.

  3. 03

    The old workaround: pinning androidx.core

    Older answers force androidx.core to 1.6.0 so the attribute isn’t needed. That holds back security and API fixes in androidx; raise compileSdk instead and drop the pin if your project still has it.

Checked against the vendor’s docs on : Android Developers: R.attr (lStar, added in API level 31).

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Gradle “Could not resolve all files” · Android “:app:mapDebugSourceSetPaths” failed · Google Play target API level

Questions

More on this error

Does raising compileSdk drop support for older phones?

No. minSdk decides the oldest Android version that can install the app. compileSdk is only what the build compiles against.

Is this the same as the Play target API requirement?

No. Google Play requires a recent targetSdk for new uploads. compileSdk must be at least as high as targetSdk, so raising both together is common.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.