Software⏱️ 3 min read📅 2026-06-03

How to Fix: Message "error: resource android:attr/lStar not found"

Flutter Android app compilation error due to missing resource android:attr/lStar.

Quick Answer: Check if the 'lStar' attribute is used in your app's styles or layouts. If not, remove the reference to it from your resources.

A Flutter Android app has encountered an error while compiling, resulting in a 'resource android:attr/lStar not found' message. This issue affects developers who are using custom resources in their apps.

The presence of this error can be frustrating for developers as it indicates that the app's resources are not properly configured. However, with the right steps, you can resolve this issue and get your app compiled successfully.

🔍 Why This Happens

  • The 'resource android:attr/lStar not found' error typically occurs when a custom resource is used in an Android app without being defined correctly in the project's resources.
  • Another possible cause of this error could be due to a mismatch between the version of the Flutter SDK and the Android API used in the app.

🛠️ Step-by-Step Verified Fixes

Resolving the Error by Defining Custom Resources

  1. Step 1: Step 1: Check if the custom resource is defined correctly in the project's resources. Ensure that it is declared in the res/values/attrs.xml file.
  2. Step 2: Step 2: Verify that the custom resource has a valid name and is properly formatted according to Android's resource naming conventions.
  3. Step 3: Step 3: If the issue persists, try deleting the .gradle/caches directory and running the app again. This will force Gradle to re-link the resources.

Alternative Fix Method - Using a Compatible Resource

  1. Step 1: Step 1: Check if there are any compatible resources available in the Android SDK that can replace the custom resource.
  2. Step 2: Step 2: If a compatible resource is found, update the app's code to use this resource instead of the custom one.

💡 Conclusion

By following these steps and understanding the root causes of the 'resource android:attr/lStar not found' error, developers can successfully resolve the issue and get their Flutter Android apps compiled correctly.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions