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 dependency manager\Android, press 'Resolve dependencies', then press 'delete resolved libraries' (otherwise the build will fail at the gradle stage)
Build and run.
When the app tries to run I immediately get the error message on my phone 'app has stopped working' and see this error in the logs ...
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.FacebookContentProvider" on path: DexPathList[[zip file "/data/app/com.SandwichGeneration.MakeASquare--nLEHpzOYlwW6XKmGzPfIw==/base.apk"],nativeLibraryDirectories=[/data/app/com.SandwichGeneration.MakeASquare--nLEHpzOYlwW6XKmGzPfIw==/lib/arm64, /data/app/com.SandwichGeneration.MakeASquare--nLEHpzOYlwW6XKmGzPfIw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
Suggested fixes I've tried from here
I've tried different combinations of old or new facebook sdks and old or new versions of Unity.
I've tried building from a few different machines to different Android devices.
I've deleted the external dependency manager included with the facebook sdk and used this one instead. In order to get this one to resolve I had to set a 'Custom Gradle Properties Template'in the player setting under publishing settings.
I've set a Custom Proguard file'in the player setting under publishing settings, and I added the following two lines to the file..
-keep class com.facebook.internal.* {*;} -keep class com.facebook.* {*;}
So I've tried all the suggested fixes and various combinations thereof. I dont know what more I can do. Can anyone suggest anything else to try?