I’m currently trying to build my project which includes the latest version of the Facebook SDK (7.11.0). I’m trying to build just a simple project on multiple versions of unity - 5.6.1, 5.6.5 and 2017.3.1 and all of them are giving me the same issues.
On trying to build to a device I get the “Error building Player: Your Android setup is not correct. See Settings in Facebook menu.”.
Your Android setup is not correct. See Settings in Facebook menu.
UnityEngine.Debug:LogError(Object)
Facebook.Unity.Editor.XCodePostProcess:OnPostProcessBuild(BuildTarget, String)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
It still creates an APK however when I try to put this on a device it instantly crashes with a fatal exception when trying to login using Facebook.The error is caused by:
3-01 12:53:40.350: E/AndroidRuntime(4277): Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/FacebookActivity;
If I look at the Facebook Settings menu I can’t see any errors other than a warning that it’s missing the android debug keystore however I know this is there as I can see it. I’ve tried deleting it and using Android Studio to create a new one to no avail and I’ve also used keytool to manually generate one - still says it’s missing and it doesn’t seem to matter which version of Unity. I’ve seen some people reference changing a CS file in the SDK to fix this but I don’t seem to have the CS files in the Facebook SDK to do this.