I'm working on a React Native application. My Android builds began to fail in the CI environment (and locally) without any changes.
Execution failed for task ':app:processDevelopmentDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
.../app/build/intermediates/incremental/mergeDevelopmentDebugResources/merged.dir/values/values.xml:2682: AAPT: error: resource android:attr/lStar not found.
According to Android: Resource linking fails on test execution even when nothing has been changed, this happened because some library got upgraded.
lStar needs compileSdkVersion 31 and my project used compileSdkVersion 28.
How can I track which libraries got updated recently, or which library is causing this?
How do I remove "Failed linking resources" error in Andriod studio? You may be having this error on your JAVA files because there is one or more XML file with an error. Go through all your XML files and resolve errors, then clean or rebuild the project from the build menu. Start with your most recent edited XML file.
The problem is @react-native-community/netinfo
. Just try to update the package using
yarn add @react-native-community/netinfo
or
npm update @react-native-community/netinfo
There isn't any need to change anything over your Gradle or Android files as those might mess things up even more.
Go to android/build.gradle and add androidXCore = "1.6.0" to ext:
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
googlePlayServicesAuthVersion = "16.0.1"
androidXCore = "1.6.0"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With