'A problem occurred evaluating project ':react-native-reanimated'. Cannot get property 'react' on extra properties extension as it does not exist

i am updating a react-native project i upgrade all node_moduls even add react-native reanimated newer version 2.4.1 but this show error every time enter image description here .I also edit my build.gradle file

as show below

  ext {
        buildToolsVersion = "30.0.3"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        googlePlayServicesVersion = "19.0.1"
        supportLibVersion = "28.0.0"
    }

and react native reanimated build.gradle file error on line 55 is

 if(project.ext.react.enableHermes) {
            engine = "hermes"
        }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source