[Solved] Execution failed for task ':app:processDevelopmentDebugResources'
While working on react-native app my android build failed on the CI environment and locally. I am getting this error -
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.
Also getting this error -
core-1.7.0-alpha02\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
Solution 1:
This happened cause some library got upgraded. After searching I found because of this "@react-native-community/netinfo" package I am facing problem. So you have to update the package using -
yarn add @react-native-community/netinfo
or
npm update @react-native-community/netinfo
No need to change anything on the android files or gradle.
Solution 2:
If previous solution not work, then you can update the android/build.gradle file -
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
googlePlayServicesAuthVersion = "16.0.1"
androidXCore = "1.6.0"
}
Here androidXCore = "1.6.0" is the main part to solve this problem.
Thanks for reading the post. If you have any problem, you can comment here.