th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.08k stars 191 forks source link

【Android】Build failed with an exception, Execution failed for task ':react-native-safe-area-context:verifyReleaseResources' #483

Closed apple01150525 closed 3 months ago

apple01150525 commented 3 months ago

Hi, am facing below error while buiding a release package in Android

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-safe-area-context:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR:/Users/tal/.gradle/caches/transforms-3/704a699cce164bee67e85bd7e7bd9e33/transformed/core-1.7.0/res/values/values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.  

But it runs normally in debug mode,

this is my package.json

 "dependencies": {
    "@emas/emas-jserror-reporter": "0.15.0",
    "@react-navigation/native": "6.1.14",
    "@react-navigation/native-stack": "6.9.22",
    "@reduxjs/toolkit": "2.2.1",
    "axios": "1.6.7",
    "crypto-js": "4.2.0",
    "link": "2.1.0",
    "react": "18.2.0",
    "react-native": "0.73.5",
    "react-native-linear-gradient": "2.8.3",
    "react-native-radial-gradient": "1.1.4",
    "react-native-safe-area-context": "4.9.0",
    "react-native-screens": "3.29.0",
    "react-redux": "9.1.0",
    "redux": "5.0.1"
  },

how do I deal with this problem?

jacobp100 commented 3 months ago

This isn't a library issue, but I'd try Googling the actual error - AAPT: error: resource android:attr/lStar not found