I\'m developing a React-native app and all of a sudden I started getting the following error:
- What went wrong: A problem occurred configurin
Add this to your build.gradle(not in app/build.gradle) file in the android folder. you don't want to add react-native version manually.
allprojects {
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
def file = new File("$rootDir/../node_modules/react-native/package.json")
def version = new groovy.json.JsonSlurper().parseText(file.text).version
details.useVersion version
}
}
}
}
}
I think this will help.