0

Okay,

So I'm working on an Android app but get the following error:

java.lang.NoClassDefFoundError in com.networkstudios.app.LoginActivity.
java.lang.NoClassDefFoundError: com.networkstudios.app.LoginActivity$1 at com.networkstudios.app.LoginActivity.(LoginActivity.java:37) at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1319) at android.app.Instrumentation.newActivity(Instrumentation.java:1068) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2007) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117) at android.app.ActivityThread.access$700(ActivityThread.java:134) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4867) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) at dalvik.system.NativeStart.main(Native Method)

Here is the code for LoginActivity.java found in com.networkstudios.app:

http://pastebin.com/4dMxD8nb

Any Ideas on this?

CloudTheWolf
  • 334
  • 2
  • 10

1 Answers1

0

The error means that your code is not able to find facebook API classes at runtime. Ensure that you have facebook.jar in your classpath when you run your code.

If you have facebook SDK in your classpath while running the code and still facing the issue then try this:

Just replace the android-support-v4.jar of your project that is in>lib folder with android-support-v4.jar present in FacebookSDK>libs folder

as mentioned on these posts:

{Facebook Login} java.lang.NoClassDefFoundError: android.support.v4.content.LocalBroadcastManager

Android facebook SDK doing error java.lang.NoClassDefFoundError‎

Community
  • 1
  • 1
Pat
  • 2,223
  • 4
  • 19
  • 25