facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
490 stars 257 forks source link

is there any solution to integrate facebook and google firebase sdk together in 2017. #128

Open charanjeet5ingh opened 6 years ago

charanjeet5ingh commented 6 years ago

Hi

I am using facebook sdk in my unity project but it's not working with google firebase sdk.

Please share your thoughts as its very urgent for us.

toom1984 commented 6 years ago

have it working with FB 7.9.4 and Firebase, still trying to get 7.10 to work at all

charanjeet5ingh commented 6 years ago

hi can you please share the version ids for firebase and facebook.

mohitghostt commented 6 years ago

1)Firebase and Facebook not work together ?

Error Type : CommandInvokationFailure: Unable to convert classes into dex format. C:\Program Files\Java\jdk1.8.0_51\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="E:/Android SDK 29 Aug/New SDK\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity 2017\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[ Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/animation/AnimatorCompatHelper; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle$ActionBarDrawerToggleImpl; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle$ActionBarDrawerToggleImplBase; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActionBarDrawerToggle$ActionBarDrawerToggleImplHC

Solutions:

Facebook version 7.9.0 Firebase Version 4.1.0

->First import Firebase plugin then do force resolve jar using playservice resolver ->then add Facebook sdk 7.9.0 then do force resolve jar using playservice resolver ->Delete or disable to files ->FacebookSDK -> plugins-> Android ->libs ->support-v4-23.4.0 = delete or disable ->FacebookSDK -> plugins-> Android ->libs ->support-annotations-23.4.0 = delete or disable

->then build and its Works(take deep breath with god name).

TeamSidGames commented 6 years ago

Try this solutions ! Works with latest plugin versions !

Resolution for Dex issues on adding Google Play Services 0.95 and Facebook sdk 7.13.0 plugins to Unity 2018.2.0f2

Step 1: First import GooglePlayServices0.95 plugin from this link https://github.com/playgameservices/play-games-plugin-for-unity.

Step 2: Un Check PlayServicesResolver folder when showed folder structure to import.

Step 3: Now Import Facebook SDK 7.13.0 unity package from https://developers.facebook.com/docs/unity/downloads/

Step 4: Here import all folders of the facebook sdk plugin.

Step 5: Now select Assets/PlayServicesResolver/VersionHandler/Update

Step 6: Now select Assets/PlayServicesResolver/AndroidResolver/Resolve

Step 7: Now select Assets/PlayServicesResolver/AndroidResolver/Settings and then uncheck Enable Auto-Resolution

Step 8: Now go to Project Panel and go to Assets/Plugins/Android/ and delete all folders except folder with this name "com.google.games.gpgs-plugin-support-0.9.50"

Step 9: Now go to Project Panel and go to Assets/Plugins/Android/ and delete the following files

com.android.support.animated-vector-drawable-25.3.1
com.android.support.customtabs-25.3.1
com.android.support.support-annotations-25.3.1
com.android.support.support-v4-25.3.1
com.android.support.support-vector-drawable-25.3.1

Now proceed with build making. It should work. :)

KaranKapoor commented 6 years ago

you are amazing.. thank you for the above solution. Any idea if I include Admob into the mix, what libraries i'll need to retain?

shinriyo commented 6 years ago

Where is play-services-resolver? I just download from https://github.com/googlesamples/unity-jar-resolver/blob/master/play-services-resolver-1.2.95.0.unitypackage and put and rename in facebook-sdk-for-unity/play-services-resolver.unitypackage.

asadmubashr commented 3 years ago

I wanna laugh on Unity developers, they are just trying to fluke things which thing with which runs what a shame. Fuck you Unity