Duplicate Provider Authority after building my app

i have created a master app with intention of building into multiple apps with different names and widget id’s. After building my app and submit to playstore and try to install to a device, i get an error “Duplicate Provider Authority” {because i have already installed another app with different widget id but same app from the same project} and so the app can not be installed…

i tried changing widget id into something complex like com.name1.name2.name3.name4 but still the error didn’t go away.

i came back to my project folder and tried to go through config.xml (i didn’t find anything of help in here), so i went to my project/platforms/android/AndroidManifest.xml and looked on i found that every time i tried to build my app, this field was populated with the same android authority… i.e com.ionicframework.{app name and id i got when i started this project}.sharing.provider and was not changing even if i changed my widget id in app config.xml

how can i overcome this problem, even if changing the app name because if the app name changes in AndroidManifest.xml, i will not have this “Duplicate Provider Authority” error.

Thank you.

Probably easiest fix: Remove and re-add the Android platform from your Ionic/Cordova project after changing the app ID. This regenerates all platform specific code like config.xml. (If you still want to find out what caused the problem, generate your app twice with different app IDs and compare the generated folders and files to see how they differ)