close

[Fixed] AAPT: error: resource android:attr/lStar not found in Android

Today We are Going To Solve AAPT: error: resource android:attr/lStar not found in Android in Android. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix AAPT: error: resource android:attr/lStar not found in Android Error?

  1. How to Fix AAPT: error: resource android:attr/lStar not found in Android Error?

    To Fix AAPT: error: resource android:attr/lStar not found in Android Error just Update your package with yarn. Here the problem is because of @react-native-community/netinfo. So you have to just update your package with yarn so you have to run this command to solve your error. So try this: yarn add @react-native-community/netinfo

  2. AAPT: error: resource android:attr/lStar not found in Android

    To Fix AAPT: error: resource android:attr/lStar not found in Android Error just Update compileSdkVersion and targetSdkVersion to 31. This error occurs because of androidx.core:core-ktx. So if you are using core-ktx, then just change implementation "androidx.core:core-ktx:+"
    to implementation "androidx.core:core-ktx:1.6.0" And then update compileSdkVersion and targetSdkVersion to 31 and your error will be solved.

Solution 1 : Update your package with yarn

Here the problem is because of @react-native-community/netinfo. So you have to just update your package with yarn so you have to run this command to solve your error. So try this:

yarn add @react-native-community/netinfo

Solution 2 : Update compileSdkVersion and targetSdkVersion to 31

This error occurs because of androidx.core:core-ktx.

So if you are using core-ktx, then just change

implementation "androidx.core:core-ktx:+"

to

implementation "androidx.core:core-ktx:1.6.0"

And then update compileSdkVersion and targetSdkVersion to 31 and your error will be solved.

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment