Search Unity

NoClassDefFoundError: Failed resolution of: Lcom/facebook/FacebookActivity

Discussion in 'Editor & General Support' started by fdfdsgfdgdsg, May 15, 2017.

  1. fdfdsgfdgdsg

    fdfdsgfdgdsg

    Joined:
    Feb 8, 2015
    Posts:
    5
    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.
     
  2. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    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.
     
    Last edited: Aug 27, 2017
  3. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Ok I found a solution, I deleted my entire Plugins/Android folder, then reimported, set all the settings, regenerated AndroidManifest and it worked!
     
  4. StudioLeaves

    StudioLeaves

    Joined:
    Nov 5, 2013
    Posts:
    2
    Me too, i just used Facebok SDK 7.9.4 and when i delete and reinstall the entire Library, everything worked fine. This is insane...
     
  5. CalaveraX

    CalaveraX

    Joined:
    Jul 11, 2013
    Posts:
    143
    Any more hints on this ? Already Deleted and reimported Fb SDK and still having this same issue.
     
  6. scinfu

    scinfu

    Joined:
    Oct 23, 2008
    Posts:
    404
    Me too, with Samsung S7 work and with nexus 4 no.
    Any one?