skip to Main Content

when I try to build the APK in my react-native project I’m facing AAPT: error: resource android:attr/lStar not found.

node version : 12.22.12
react-native : 0.63.2
buildToolsVersion : 29.0.2
minSdkVersion : 21
compileSdkVersion : 29
targetSdkVersion : 30
kotlinVersion: 1.3.72

2

Answers


  1. This solution worked for me. Add the below mentioned code in the build.gradle file under android/app

        dependencies {
            // implementation "com.facebook.react:react-native:+"  // From node_modules
            implementation ("com.facebook.react:react-native:0.64.2") {
                force = true;
            }
       
        }
        
    
        apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
        
    
    configurations.all {
            resolutionStrategy {
                force 'androidx.core:core:1.6.0'
                force 'androidx.core:core-ktx:1.6.0'
            }
        }
    
    Login or Signup to reply.
  2. Updating from [email protected] to [email protected] worked for me with this same issue.

    As described here:

    https://github.com/facebook/react-native/issues/35210

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search