Wizcorp / phonegap-facebook-plugin

The official plugin for Facebook in Apache Cordova/PhoneGap
Other
1.91k stars 2.01k forks source link

conflict between attrs.xml for FacebookLib between plugins and platform folder #466

Open abcnever opened 10 years ago

abcnever commented 10 years ago

When I tried to build after the new automatic installation process, conflict is reported:

 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:20: error: Attribute "show_pictures" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:21: error: Attribute "extra_fields" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:22: error: Attribute "show_title_bar" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:23: error: Attribute "title_text" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:24: error: Attribute "done_button_text" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:25: error: Attribute "title_bar_background" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:26: error: Attribute "done_button_background" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:29: error: Attribute "multi_select" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:32: error: Attribute "radius_in_meters" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:33: error: Attribute "results_limit" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:34: error: Attribute "search_text" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:35: error: Attribute "show_search_box" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:38: error: Attribute "confirm_logout" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:39: error: Attribute "fetch_user_info" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:40: error: Attribute "login_text" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:41: error: Attribute "logout_text" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:44: error: Attribute "preset_size" has already been defined
 [aapt] /home/edward/src/syncID/kingslist-phonegap/plugins/com.phonegap.plugins.facebookconnect/src/android/facebook/FacebookLib/res/values/attrs.xml:50: error: Attribute "is_cropped" has already been defined

it turns out that the same attrs.xml also exists under platforms/android/FacebookLib/res/values

ajbraus commented 10 years ago

So what did you do? My build keeps breaking. I've tried commenting out one and the other. I've tried deleting one and the other. I keep getting this error.

abcnever commented 10 years ago

@ajbraus I gave up on the newer plugin. downloaded 0.4.2 instead ( https://github.com/phonegap/phonegap-facebook-plugin/releases/tag/0.4.2 ) and it worked out perfectly.

edit: in case you don't know how to use the old version. just add it with cordova CLI.

cordova -d plugin add path/to/4.2/release/ --variable APP_ID="YOUR_FB_APP_ID" --variable APP_NAME="YOUR_APP_NAME"

and add this to your config.xml

<feature name="org.apache.cordova.facebook.Connect">
    <param name="android-package" value="org.apache.cordova.facebook.ConnectPlugin" />
    <param name="ios-package" value="FacebookConnectPlugin" />
 </feature>
ajbraus commented 10 years ago

Did you just drop the files in and build, or did you have to do a manual installation? Thanks!

abcnever commented 10 years ago

@ajbraus cordova CLI should be automatic. download the 0.4.2 release, unzip / unpack it to a directory, and just pass in the plugin directory with cordova CLI. for example if you unpacked it to ~/src/phonegap- facebook-plugin/ type in the following command

cordova -d plugin add ~/src/phonegap-facebook-plugin/ --variable APP_ID="<YOUR_FB_APP_ID>" --variable APP_NAME="<YOUR_APP_NAME>"

i also recommend the newest cordova (3.5.xx).

and of course add that feature tag to your config.xml

then your build should be working fine from that point on

chintans commented 9 years ago

Is there any solution for this in latest version? It makes plugin not useable.

aogilvie commented 9 years ago

@chintans I don't understand the issue here: where else is this attrs.xml file?