Skip to content Skip to sidebar Skip to footer

Unity Facebook Sdk 'didn't Find Class "com.facebook.facebookcontentprovider"' Any More Suggestions For This?

How to replicate this error... Create a new Unity project. Import the facebook sdk unitypackage Set your App Id for facebook via Facebook\Edit Settings Using Assets\External de

Solution 1:

Ok heres one specific method I followed where it worked.

  • Unity version: 2019.3.15f1

  • Facebook SDK version: 7.21.2

  • Using the PlayServicesResolver, Resolve libraries

  • Do not Delete Resolved Libraries

  • Set a Custom Proguard file in the player setting under publishing settings, and add the following two lines to the file..

      -keep publicclasscom.facebook.**{public *; } 
      -keep publicclasscom.facebook.internal.**{ public *; }
    
  • Comment out these lines from mainTemplate.gradle

         com.android.support:appcompat-v7
         com.android.support:support-v4
         com.android.support:customtabs
    

So your mainTemplate.gradle will look something like this...

    `// Android Resolver Repos End
    apply plugin: 'com.android.library'

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'// Android Resolver Dependencies Start//implementation 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency//implementation 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency//implementation 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency

        implementation 'com.facebook.android:audience-network-sdk:6.0.0'// Assets/IronSource/Editor/ISFacebookAdapterDependencies.xml:8
        implementation 'com.facebook.android:facebook-applinks:[7.1.0, 8)'// Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:6
        implementation 'com.facebook.android:facebook-share:[7.1.0, 8)'// Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:8
        implementation 'com.android.support:cardview-v7:25.3.1'// Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
        implementation 'com.facebook.android:facebook-gamingservices:[7.1.0, 8)'// Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:9
        implementation 'com.parse.bolts:bolts-android:1.4.0'// Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:4
        implementation 'com.facebook.android:facebook-core:[7.1.0, 8)'// Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:5
        implementation 'com.facebook.android:facebook-login:[7.1.0, 8)'// Assets/FacebookSDK/Plugins/Editor/Dependencies.xml:7
        implementation 'com.google.android.gms:play-services-ads:19.4.0'// Assets/IronSource/Editor/ISAdMobAdapterDependencies.xml:8
        implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'// Assets/IronSource/Editor/IronSourceSDKDependencies.xml:17
        implementation 'com.google.android.gms:play-services-basement:17.2.1'// Assets/IronSource/Editor/IronSourceSDKDependencies.xml:25// Android Resolver Dependencies End
    **DEPS**}`

Post a Comment for "Unity Facebook Sdk 'didn't Find Class "com.facebook.facebookcontentprovider"' Any More Suggestions For This?"