Terecle: Tech Careers, Help & How-To GuidesTerecle: Tech Careers, Help & How-To GuidesTerecle: Tech Careers, Help & How-To Guides
  • PCs & Hardware
    • Laptops
  • Software & Services
    • Communications
    • Productivity
  • PC Games
  • Social Media
    • Facebook
    • Messenger
    • Instagram
    • LinkedIn
    • Snapchat
    • Discord
    • TikTok
    • WhatsApp
Terecle: Tech Careers, Help & How-To GuidesTerecle: Tech Careers, Help & How-To Guides
Search
  • PCs & Hardware
    • Laptops
  • Software & Services
    • Communications
    • Productivity
  • PC Games
  • Social Media
    • Facebook
    • Messenger
    • Instagram
    • LinkedIn
    • Snapchat
    • Discord
    • TikTok
    • WhatsApp
Follow US
Operating Systems > aapt:error: resource android:attr/lstar not found in Android [Fixed]

aapt:error: resource android:attr/lstar not found in Android [Fixed]

Ogechukwu Anthony
Last updated: September 13, 2023 12:04 pm
By
Ogechukwu Anthony
3 Min Read
Share

aapt:error: resource android:attr/lstar not found in Android error occurs when you run the test for release while executing your code. These few steps can help you solve the error.

Change to android x.core:core -ktx:1.6.0

  • Open your app/build.gradle file and change this line: androidx.core:core-ktx:+
  • Replace it with: android x.core:core -ktx:1.6.0

Let’s say you are using ‘androidx.core:core-ktx:+’. Find the latest version of androidx.core:core-ktx:+ and replace it. The latest version is 1.7.0 and this latest version needs the Android 31 compile SDK. So use the updated version to upgrade the compiled SDK to Android 31.

  • Open Android/app project
  • Search the text android x.core:core -ktx:+ in all solutions. It is found in some cases in build.gradle file.
  • Change from android x.core:core -ktx:+ to android x.core:core -ktx:1.6.0.

Upgrade the compiled SDK to Android 31

If you are using android x.core:core -ktx:+ , then find and upgrade to the latest version with android x.core:core -ktx:1.6.0.

Migrating to Android 31 is not always an easy solution especially since plugins and dependencies needs to support it in particular. However, check your plugins and dependencies and if possible set set static versions instead of ‘latest’. That way you can avoid using alpha/beta releases which could be unstable.

To compile SDK version and target SDK version to 31, add this code snippet in your Android/build.gradle file at the very end;

Configurations.all{resolution strategy}{Force androidx.core:core}

Temporary solutions that might suffice includes:

  • Install latest Applovin(11.4) and latest adapters
  • Disable auto resolution on build in EDM
  • Resolve aars with external dependency manager so it pulls everything
  • Delete android x.core-1-x.x (possibly 1.7.0) in all plugins/Android
  • Refresh the whole Android platform and your project should not use androidx.core:core:1.7.0-beta02

Recently, the authors of audio players package fixed the issue in the recent upgrade. It has been fixed in audio player version 0.2.0.1. if the issue is related to an audio player simply do an upgrade.

If you received in Android studio when there is a new application, the issue is from BOTH appcompat and core.ktx in dependence.

  • Open Open build.gradle
  • Look in dependence
  • Roll back appcompat to 1.3.0
  • Roll back core-ktx to 1.6.0
  • Tap ‘Sync now’ at the top right
  • Rerun your program, hopefully the error is averted.

These troubleshooting steps will help you solve the “aapt:error: resource android:attr/lstar not found in Android ”

Was this article helpful?
YesNo
Share This Article
Facebook Reddit Threads Email Copy Link
ByOgechukwu Anthony
I am an experienced tech and innovation writer. It's been 3 years since I started writing at Terecle, covering mostly Consumer electronics and Productivity. In my spare time, I enjoy reading and learning the latest happenings around the tech ecosystem.
-Advertisement-

Related

iphone

How to See Your Clipboard History on iPhone

By
Ogechukwu Anthony
User Busy iPhone

User Busy iPhone (Fixed)

By
Dara Eduok

How to Cancel Facetune2 App on iPhone

By
Ogechukwu Anthony
Android Microphone Not Working During Call

How to Fix Android Microphone Not Working During Calls

By
Ogechukwu Anthony

Terecle is your #1 authority hub for tech career clarity and growth, guiding you from choosing your path to landing your dream job.

  • Editorial Statement
  • Privacy Policy
  • Cookie Disclosure
  • Advertise with us
  • Contact us

© 2021-2025 HAUYNE LLC., ALL RIGHTS RESERVED​

Terecle is part of Hauyne publishing family. The display of third-party trademarks and trade names on this site does not necessarily indicate any affiliation or endorsement of Terecle.