React-native-background-geolocation: Execution failed for task ':react-native-mauron85-background-geolocation:processReleaseResources'. > Error: more than one library with package name 'com.google.android.gms.license'

Created on 21 Mar 2018  路  4Comments  路  Source: mauron85/react-native-background-geolocation

I dont know why this issue is coming up suddenly. Please help

bug

Most helpful comment

@mauron85 it's not working for me

All 4 comments

It seems that google updated some android libraries yesterday and as result this package is broken again. I'm getting sick of how fragile dependencies are in react-native ecosystem.

For the moment you can try to force previous versions of play-services v11:

In your project edit file android/build.gradle and add configurations.all section:

allprojects {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        configurations.all {
            resolutionStrategy {
                // Add force (11.4.0 is version you want to use)
                force 'com.google.android.gms:play-services-base:11+'
                force 'com.google.android.gms:play-services-location:11+'
            }
        }
    }
}

@mauron85 Thanks, it worked!

I have a few more queries now. Would appreciate if you could provide your inputs on the same.

Below is the configuration which I am using for Android and iOS.

BackgroundGeolocation.configure({
desiredAccuracy: 10,
stationaryRadius: 1,
notificationTitle: 'Background tracking',
notificationText: 'enabled',
debug: false,
startOnBoot: false,
stopOnTerminate: false,
locationProvider: Platform.OS == 'ios' ? SBackgroundLocation.getInstance().getBackroundLocation().DISTANCE_FILTER_PROVIDER : SBackgroundLocation.getInstance().getBackroundLocation().ACTIVITY_PROVIDER,
interval: 120000,
// fastestInterval: 5000,
// activitiesInterval: 100000,
stopOnStillActivity: false,
});

Android : Instead of interval I would like to update the location based on kms travelled. Is there any provision for that ?. if not, could you please suggest me the filename where I can make the changes?

iOS : The BGlocation gets called at times even if the App is stationary. What is the best config for iOS ?.

@mauron85 it's not working for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

canerd7u picture canerd7u  路  7Comments

dengue8830 picture dengue8830  路  6Comments

sefatunckanat picture sefatunckanat  路  7Comments

vinceprofeta picture vinceprofeta  路  5Comments

ianaz picture ianaz  路  4Comments