cordova-plugin-locationservices
cordova-plugin-locationservices copied to clipboard
Build error: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver
Google recently (June 17, 2019) released version 17.0.0 of the location services library. This release includes the following breaking change:
Migration from Android Support Libraries to Jetpack (AndroidX) Libraries.
See the Google Play Services Release Notes for more information.
This change results in a build failure with the following error if the Android Support library is used by another plugin (for example cordova-plugin-camera):
Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver
As a short term work-around is to use version 16.0.0 of the location services library. This can be achieved by changing the following line in the plugin.xml file from:
<framework src="com.google.android.gms:play-services-location:+" />
to
<framework src="com.google.android.gms:play-services-location:16.+" />
This will allow the app to build again.
I have submitted a Pull Request that makes the above change.
having the same problem, expecting the solution