Recently, I want to try the KTX expansion Library of Android core in the project:
implementation "androidx.core:core-ktx:1.7.0"
After adding dependency, we happily start to use various concise syntax sugars provided by KTX to fly happily~
Once running, wow, I reported an error:
Android resource linking failed /Users/xxx/.gradle/caches/transforms-2/files-
2.1/5d04bb4852dc27334fe36f129faf6500/res/values/values.xml:115:5-162:25:
AAPT: error: resource android:attr/lStar not found.
Solution 1:
If the dependency method is
AndroidX.Core: core-ktx:+
you need to replace it with a specific version
AndroidX.core:core-ktx:1.6.0
Solution 2:
If the version is 1.7.0
, the compilesdkversion
of the project is 31
, because my project is 30
, an error will be reported and changed to 1.6.0
version is good
Read More:
- [Solved] Compile Error: AAPT: error: resource android:attr/lStar not found
- error: resource android:attr/lStar not found [Pefect Solution]
- error: resource android:attr/lStar not found [How to Solve]
- error: resource android:attr/lStar not found [How to Solve]
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- error: resource android:attr/lStar not found? [How to Solve]
- Android Error: Found item attr/tabtextsize more than one time
- AAPT: error: attribute cardBackgroundColor (aka com.x.x:cardBackgroundColor) not found.
- Android Package Error: AAPT: error: IDAT: incorrect data check. AAPT: error: file failed to compile.
- Android Error: Android resource linking failed [How to Solve]
- [Solved] :app:processDebugResources Android resource linking failed Android resource linking failed
- [Solved] Android Studio Error: AAPT: error: file failed to compile
- The SDK of Android webrtc compiled with Ninja – C out / release command reported an error, and the Android NDK processing method could not be found
- [Solved] Android resource linking failed, error: failed linking references.
- Flutter Error: dump failed because resource AndroidManifest.xml not found [How to Solve]
- Vue Browser Error: Failed to load resource: the server responded with a status of 404 (Not Found)
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.
- [Solved] Android Studio Error:SDK location not found.
- [Solved] Android Error: AAPT: error: unescaped apostrophe in string;Multiple substitutions specified in non-positi
- Remember an android app startup error Error running: Default Activity not found