AAPT: error: resource android: attr/IStar not found.
This error occurred suddenly, it was working fine last week.
I’ve tried many solutions but none works. Solutions tried:
- Delete, reinstall npm, using
npm install
- clean gradle with
./gradlew clean
in /android - Cleaning npm cache with
npm cache clean --force
- add
org.gradle.jvmargs=-Xmx4608m
in /android/gradle.properties - In /android/build.gradle, inside
ext{}
addandroidXCore = "1.6.0"
npm update @react-native-community/netinfo
- androidx.core:core-ktx:+ to androidx.core:core-ktx:1.6.0 but I’ve searched through my project, there is no ‘androidx.core:core-ktx:+. So this solution I found is irrelevant.
Version:
"react-native": "0.63.4",
compileSdkVersion = 29
targetSdkVersion = 29
2
Answers
Add this in your
android/buld.gradle
file.Ref : https://github.com/facebook/react-native/issues/35210
There had been a series of build failures React Native & Expo users have been experiencing when building Android apps starting from November 4th 2022. Your issue is the same.
Since you are using
React-native 0.63
React-native has a new patch released for it. try updating your react-native in yourpackage.json
from"react-native": "^0.63.4"
to"react-native": "^0.63.5"
and try runningnpm install
and everything will work fine.The suggested answer by Thanhal will give you some headaches if you try to upgrade to a new version of react-native and forget to remove it from build.gradle.
for more info please refer to This issue on github