Sometimes you may come across the following error, usually when you build an Android application using React Native.
A problem occurred configuring project ‘:app‘.
> Could not resolve all dependencies for configuration ‘:app:_debugApk’.
> Configuration with name ‘default’ not found.
This error occurs when some configurations in your gradle files are not matching. Hence, there are few things to do to fix this React Native error.
First of all, run the following command to get more build progress details and assess the results to find any specific error.
cd android && gradlew assembleDebug –info
Next thing is to verify details given in the gradle.properties file are correct. Also, if this error caused by any third party module/library make sure it is added to the project using either npm or yarn.
Finally, do a gradle clean with the following command:
cd android && gradlew clean
Following the steps given above will fix this React Native issue.