When integrating androidx.activity:activity in Android projects, an error is reported.xxx/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:5395: error: resource android:attr/lStar not found.error: failed linking references.
Analysis.
1. gradle introduces the configuration.
def activity_version = "1.4.0-alpha02"
// Java language implementation
implementation "androidx.activity:activity:$activity_version"
// Kotlin
implementation "androidx.activity:activity-ktx:$activity_version"
2. Project gradle configuration:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
3. The project is a brand-new project and kotlin has not been introduced, so it is not a kotlin version number problem.
4. After modifying the compilesdkversion and targetsdkversion to 31, the operation is normal.
Read More:
- error: resource android:attr/lStar not found [Pefect Solution]
- [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]
- [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]
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.
- [Solved] :app:processDebugResources Android resource linking failed Android resource linking failed
- 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)
- Remember an android app startup error Error running: Default Activity not found
- [Solved] Android Studio Error:SDK location not found.
- [Solved] Android HTTPS request resource or interface error: server certificate
- [Solved] Android resource linking failed, error: failed linking references.
- 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
- Flutter android studio runs gradle build error: Could not resolve all artifacts for configuration’:classpath’.