The error is
How to build it?
Hello, what Android Version are you using?
There is no option to select Android version on the tab of Native platform configuration. But I will use the app on Android 6.
I'm using a component from Github but it seems like the author hasn't updated it for a long time. I think that's the problem
Which one do you use?
As stated in the description:
https://github.com/pmwisdom/cordova-background-geolocation-services.git
If you still having problems you could try to use this plugin:
https://github.com/transistorsoft/cordova-background-geolocation-lt