Build Error Task :app:processReleaseManifest

I’m migrating app from PhoneGap Build
When trying to build on Android, I get this error:

> Task :app:processReleaseManifest FAILED
/platforms/android/app/src/main/AndroidManifest.xml:37:5-66 Error:
	Element uses-feature#android.hardware.location.gps at AndroidManifest.xml:37:5-66 duplicated with element declared at AndroidManifest.xml:32:5-91
/platforms/android/app/src/main/AndroidManifest.xml Error:
	Validation failed, exiting

Probably 2 plugins are requiring GPS sensor (but I don’t know which).
How I can fix that?


Do you use cordova-plugin-geolocation or cordova-plugin-googlemaps? They are a couple of good candidates.

Yes, I use both.
Now, I have commented out cordova-plugin-geolocation in config.xml and app gets compiled …
But I need it… there’s some solution?


I have no inside knowledge of how these plugins work, but it looks like they are both trying to set the same setting. You might ask the author of the plugin for more info.

Finally I found a workaround:

<plugin name="cordova-plugin-geolocation" source="npm" spec="~4.0.2" />

Seems latest version introduces this problem, so I rollback to previous one.

I reported this to plugin authors:

Hope it helps

Thanks for posting this followup!