Configuration named 'default' not found - React Native

When I run react-native run-android , I get the following error:

 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApk'. > Configuration with name 'default' not found. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 

I know this means that there is some kind of binding error, but I cannot figure that out. I would really like to help with the correction, I am very new to android.

+10
source share
3 answers

This happens when build.gradle not found for one of your package dependencies.

To debug this problem, inside your response to your own project launch

 cd android ./gradlew clean --info 

After executing this command, you can see where the building will stop. Go to the github package page and search for problems. Most likely, you will find the answer. In my case, it was due to react-native-maps , so I need to change settings.gradle to indicate the actual build.gradle location for this package

+33
source

The same problem happens to me when using it.

responsive-native-sms-android

my decision:

npm install response-native-sms-android --save

and then modify the remaining files as described in the documentation.

+1
source

You can try

 react-native upgrade 
0
source

Source: https://habr.com/ru/post/1269885/


All Articles