. Advertisement .
..3..
. Advertisement .
..4..
The error: “Resource linking fails on lStar” is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue. Read on.
When Does The Error “Resource linking fails on lStar” Happen?
When attempting to construct your RN app today, it’s failing with the following problem.
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.
How To Solve The Error: “Resource linking fails on lStar”?
Approach 1: Upgrade react-native-community/netinfo Package
The issue appears to be with the react-native-community/netinfo package, so you simply need to upgrade this package to resolve the issue.
Utilize the following command with yarn:
yarn add @react-native-community/netinfo
with npm Package:
npm update @react-native-community/netinfo
Approach 2: Simply include androidXCore = “1.6.0” in ext in android/build.gradle
You can download an earlier version (2.7) of get-pip.py.
If approach 1 doesn’t work, change ext in androidXCore = “1.6.0” in ext in android/build.gradle. Go to android/build.gradle and open it.
Also, in ext, add androidXCore = “1.6.0” in ext as shown:
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
googlePlayServicesAuthVersion = "16.0.1"
androidXCore = "1.6.0"
}
Approach 3: Remove as many dependencies as you can from your package.json file
Excepting the solutions mentioned above, there is another solution for you to resolve the problem “Resource linking fails on lStar”. It is removing as many dependencies as you can from your package.json file until the project builds correctly. Then gradually re-add each dependency to see which ones are having issues.
Once you have added them to node modules/[dependencie]/android/build.gradle and configured the appropriate To a specific version, use androidx.core:core (1.6.0 in our case) or androidx.core:core-ktx.
After you do that, your error will be completely disappear and your program will run well wiyhout any errors. So, let’s do it to get your desired results.
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your error: “Resource linking fails on lStar” quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Read more
→ How May We Solve The Error: AAPT: error: resource android:attr/lStar not found in Android?
Leave a comment