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
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 }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.
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.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.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.See scope and start
Related: Gradle “Could not resolve all files” · Android “:app:mapDebugSourceSetPaths” failed · Google Play target API level