Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuration with name '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 that this means that there is some linking error, but I cannot figure out what. I would love some help with the fix, I am very new to android.

like image 516
zoecarver Avatar asked Jul 17 '17 02:07

zoecarver


1 Answers

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

To debug this issue, inside your react native project run

cd android
./gradlew clean --info

After running this command, you can see where the building stops. Go to that package github page and search in issues. You will most probably find the answer. In my case it was because of react-native-maps, so I have to modify settings.gradle to point the real location of build.gradle for that package

like image 187
reku Avatar answered Sep 25 '22 08:09

reku