Duplicated [string/fb_app_name] and [string/fb_app_id]


#1

hello all i’m getting this message when ionic cordova run android i’m currently user cordova-plugin-facebook4 with cordova-plugin-accountkit the project was working well before adding the facebook4 application , but after i have added it the project stop and give me this error

[string/fb_app_name] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/accountkit.xml	[string/fb_app_name] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/facebookconnect.xml	[string/fb_app_name] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/strings.xml: Error: Duplicate resources
[string/fb_app_name] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/accountkit.xml	[string/fb_app_name] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/facebookconnect.xml	[string/fb_app_name] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/strings.xml: Error: Duplicate resources
[string/fb_app_id] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/accountkit.xml	[string/fb_app_id] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/facebookconnect.xml	[string/fb_app_id] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/strings.xml: Error: Duplicate resources
[string/fb_app_id] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/accountkit.xml	[string/fb_app_id] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/facebookconnect.xml	[string/fb_app_id] /Volumes/Partion/App/Projects/TucTop Application/TucTop/platforms/android/res/values/strings.xml: Error: Duplicate resources
:mergeDebugResources FAILED

it seem that the two plugin use the fb_app_name and fb_app_id as preference , my questions in can i remove the duplicated preference ? , or if there is any way to user facebook account kit feature without using this plugin cordova-plugin-accountkit ?
thanks in advance


#2

I am getting the same error. I have to manually delete the facebookconnect.xml file. Then it builds properly. Did you find any other solution for this?


#3

when i update my android platform to 7.0.0 , and open the the facebookconnect.xml file i didn’t found the fb_app_name or fb_app_id , so it’s kind did the trick and i don’t knowif this is an error from plugin creator or from 7.0.0 android platform


#4

Do mean that you have cordova-android": "7.0.0" in your package.json file and <engine name="android" spec="7.0.0" in config.xml file ? I have cordova-android: "6.3.0" and <engine name="android" spec="6.3.0".


#5

yes currently i have android 7.0.0 , try update your global ionic cli and global cordova , and remove your android platform from your project and readd it again it will setup android@7.0.0 which did the trick