cordova-plugin-locationservices icon indicating copy to clipboard operation
cordova-plugin-locationservices copied to clipboard

Build error: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver

Open wifisher opened this issue 5 years ago • 2 comments

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.

wifisher avatar Jun 18 '19 21:06 wifisher

I have submitted a Pull Request that makes the above change.

wifisher avatar Jun 18 '19 21:06 wifisher

having the same problem, expecting the solution

jing-zhou avatar Jun 28 '19 05:06 jing-zhou