Reputation: 6403
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.
Upvotes: 12
Views: 6935
Reputation: 359
Same issue happens to me also in case of using
react-native-sms-android
my solution:
npm install react-native-sms-android --save
and then modifiying the rest files as described in documentation.
Upvotes: 1
Reputation: 763
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
Upvotes: 35