react-native-background-geolocation: Cannot change artifacts of configuration ':@mauron85_react-native-background-geolocation:default' after it has been included in dependency resolution.
Error after add react-native-onesignal and run ./gradlew clean or react-native run-android please help for fix this error thanks `FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ‘:@mauron85_react-native-background-geolocation’.
Cannot change artifacts of configuration ‘:@mauron85_react-native-background-geolocation:default’ after it has been included in dependency resolution.`
- “@mauron85/react-native-background-geolocation”: “0.6.3”,
- “react”: “16.9.0”,
- “react-native”: “0.61.4”,
- “react-native-onesignal”: “3.5.0”,
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 8
- Comments: 19
Strange. 0.6.3 wasnt working for me either but after downgrading to 0.5.6, it works fine. I can’t help you how i made it work (because i don’t know), i’m new at android. Doesn’t work on iOS
After two hours, this works.
I was using react-native-firebase for storage, react-native-onesignal for push notifications and this library for geolocation features.
At first, I commented this line from my app/build.gradle
// apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
Add following lines at the bottom
Dependencies section from that same file are:
My build.gradle file (at the root, not from app/ folder):
// Top-level build file where you can add configuration options common to all sub-projects/modules.
Finally, my versions from the package json:
Hope to help someone. Cheers!
If your project run for company, I suggest you to buy this lib https://github.com/transistorsoft/react-native-background-geolocation. Because this library won’t help you. Sorry for that
Only comments this line solve my problem, please, close this issue
Fixed & Tested!! remove following line from your app/build.gradle -> apply plugin: ‘com.onesignal.androidsdk.onesignal-gradle-plugin’
This is required only if you run into any issues with duplicate classes. i found it in onesignal build.gradle file
this solution not work on IOS