Sometimes you get this error when you are trying to run your React Native project.
To solve it, navigate to your android folder and add the below code to your build.gradle file
subprojects { subproject ->
if(project['name'] == 'react-native-reanimated'){
project.configurations { compile { } }
}
}