Today, the following errors suddenly appear in the project, and the compilation will report an error
D:\AndroidProjects\XXXXX\app\build\intermediates\incremental\mergeDebugResources\
merged.dir\values\values.xml:10858: AAPT: error: resource android:attr/lStar not found.
No one submitted the code. I could still run yesterday, but I suddenly couldn’t do it today. Then there were all kinds of tosses. I tried the common methods for difficult and miscellaneous problems in the development process. Clean project, clear the studio cache and restart, restart the computer, etc. the problems still exist. I searched for a circle and didn’t find the corresponding solutions.
Problem:
The project or third-party library relies on androidx.core: core KTX: +
, and there is no limited version. Therefore, the latest core KTX version 1.7.0 is used, and the above compilation error is reported, and it is still sudden.
Solution:
The specific version number depends on the project, not necessarily 1.3.2. I understand that it can be lower than 1.7.0
Method 1: project reference and directly set the specific version number. For example, my project:
implementation "Android. Core: core KTX: 1.3.2"
method 2: the version number is not set in the third-party dependency library. You can add the following code in build.gradle of APP module:
at the same level as Android {}
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.3.2'
}
}
Note: the specific version number of remote dependency must be set. Never use the + end. This compilation will pull the corresponding latest remote dependency. Maybe there will be an inexplicable problem that day.
Read More:
- [Solved] AAPT: error: resource android:attr/lStar not found
- error: resource android:attr/lStar not found [How to Solve]
- error: resource android:attr/lStar not found [How to Solve]
- error: resource android:attr/lStar not found? [How to Solve]
- [Solved] Compile Error: AAPT: error: resource android:attr/lStar not found
- [Solved] Flutter – AAPT: error: resource android:attr/dialogCornerRadius not found.
- Android Error: Found item attr/tabtextsize more than one time
- 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
- Android Error: Android resource linking failed [How to Solve]
- Flutter Error: dump failed because resource AndroidManifest.xml not found [How to Solve]
- [Solved] :app:processDebugResources Android resource linking failed Android resource linking failed
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.
- [Solved] Android Studio Error:SDK location not found.
- Vue Browser Error: Failed to load resource: the server responded with a status of 404 (Not Found)
- Remember an android app startup error Error running: Default Activity not found
- [Solved] Android HTTPS request resource or interface error: server certificate
- Runtime error prompt in Android Studio: arrayadapter requires the resource ID to be a textview problem
- [Solved] Android12 Error: fatal error: ‘mediadrm/ICrypto.h‘ file not found
- [Solved] Android resource linking failed, error: failed linking references.
- [Solved] Failed to load response data: no data found for resource with given identifier