I have already tried cleaning my plugins and installed a fresh Facebook Unity sdk and reinstalled other plugins affecting any plugin folder. I also clicked the Facebook auto generate android manifest button. When I try to build to Android and connect to Facebook in the game using FB.Init I always get this error.
05-15 18:39:03.693 30597 30618 I Unity : AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/FacebookActivity;
05-15 18:39:03.693 30597 30618 I Unity : java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/FacebookActivity;
05-15 18:39:03.693 30597 30618 I Unity : at com.facebook.internal.Validate.hasFacebookActivity(Validate.java:193)
05-15 18:39:03.693 30597 30618 I Unity : at com.facebook.FacebookSdk.sdkInitialize(FacebookSdk.java:201)
05-15 18:39:03.693 30597 30618 I Unity : at com.facebook.unity.FB.Init(FB.java:86)
05-15 18:39:03.693 30597 30618 I Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
05-15 18:39:03.693 30597 30618 I Unity : at com.unity3d.player.UnityPlayer.a(Unknown Source)
05-15 18:39:03.693 30597 30618 I Unity : at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source)
05-15 18:39:03.693 30597 30618 I Unity : at android.os.Handler.dispatchMessage(Handler.java:98)
05-15 18:39:03.693 30597 30618 I Unity : at android.os.Looper.loop(Looper.java:148)
05-15 18:39:03.693 30597 30618 I Unity : at com.unity3d.player.UnityPlayer$c.run(Unknown Source)
05-15 18:39:03.693 30597 30618 I Unity : Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.facebook.FacebookActivity” on path: DexPathList[…
Anyone has an Idea how to solve the error? Its working perfectly in IOS for me.
Did you get this working? I’m having the same problem. Facebok SDK 7.9.4
I regenerated Android manifest, checked all app id’s etc are correct. Game is live (game already works with FB on Windows Store), and I’ve added the correct Android settings in my Facebook apps settings screen.