java.lang.ClassNotFoundException: com.facebook.R$style

Stack Overflow | SneezingGal | 8 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to Rafael Fischer Viola and rafael . Or join the community to write better ones.
  1. 0

    how to add Facebook latest Android SDK into Eclipse

    Stack Overflow | 8 months ago | SneezingGal
    java.lang.ClassNotFoundException: com.facebook.R$style
  2. 0
    samebug tip
    This exception normally means you either have to add the said class to your dependencies or you miswrote it. Look in the documentation of your library how to add it as a dependency.
  3. 0
    samebug tip
    If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add with the following: <groupId>com.fasterxml</groupId> <artifactId>classmate</artifactId> <version>1.0</version>
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    This was caused by a failure to instantiate Kafka broker. Check your dependencies.
  6. 0
    samebug tip
    NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    com.facebook.R$style

    at java.net.URLClassLoader.findClass()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader.findClass(Unknown Source)
    2. java.lang.ClassLoader.loadClass(Unknown Source)
    3. java.lang.ClassLoader.loadClass(Unknown Source)
    3 frames
  3. com.facebook.login
    LoginButton.getDefaultStyleResource
    1. com.facebook.login.widget.LoginButton.getDefaultStyleResource(LoginButton.java:582)
    1 frame
  4. com.facebook
    FacebookButtonBase.<init>
    1. com.facebook.FacebookButtonBase.<init>(FacebookButtonBase.java:67)
    1 frame
  5. com.facebook.login
    LoginButton.<init>
    1. com.facebook.login.widget.LoginButton.<init>(LoginButton.java:201)
    1 frame
  6. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    4. java.lang.reflect.Constructor.newInstance(Unknown Source)
    4 frames
  7. com.android.ide
    ProjectCallback.loadView
    1. com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.instantiateClass(ProjectCallback.java:444)
    2. com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.loadView(ProjectCallback.java:196)
    2 frames
  8. Android Platform
    LayoutInflater.inflate
    1. android.view.BridgeInflater.loadCustomView(BridgeInflater.java:206)
    2. android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:131)
    3. android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:756)
    4. android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64)
    5. android.view.LayoutInflater.rInflate(LayoutInflater.java:728)
    6. android.view.LayoutInflater.inflate(LayoutInflater.java:492)
    7. android.view.LayoutInflater.inflate(LayoutInflater.java:373)
    7 frames
  9. com.android.layoutlib
    Bridge.createSession
    1. com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:391)
    2. com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:337)
    2 frames
  10. com.android.tools.sdk-common
    LayoutLibrary.createSession
    1. com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:349)
    1 frame
  11. com.android.ide
    AdtPlugin$11.run
    1. com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:519)
    2. com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1584)
    3. com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1309)
    4. com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.changed(GraphicalEditorPart.java:725)
    5. com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.onTargetChange(GraphicalEditorPart.java:1196)
    6. com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.onDescriptorsChanged(LayoutEditorDelegate.java:916)
    7. com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegateInitUiRootNode(LayoutEditorDelegate.java:835)
    8. com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart$TargetListener.updateEditor(GraphicalEditorPart.java:953)
    9. com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart$TargetListener.onTargetLoaded(GraphicalEditorPart.java:917)
    10. com.android.ide.eclipse.adt.AdtPlugin$11.run(AdtPlugin.java:1749)
    10 frames
  12. RWT
    Display.readAndDispatch
    1. org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    2. org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    3. org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
    4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
    4 frames
  13. Eclipse Workbench SWT
    PartRenderingEngine$4.run
    1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    1 frame
  14. Databinding
    Realm.runWithDefault
    1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    1 frame
  15. Eclipse Workbench SWT
    PartRenderingEngine.run
    1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    1 frame
  16. Eclipse Workbench
    E4Workbench.createAndRunUI
    1. org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    1 frame
  17. Eclipse UI
    Workbench$5.run
    1. org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
    1 frame
  18. Databinding
    Realm.runWithDefault
    1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    1 frame
  19. Eclipse UI
    Workbench.createAndRunWorkbench
    1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
    1 frame
  20. Eclipse UI
    PlatformUI.createAndRunWorkbench
    1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    1 frame
  21. Eclipse IDE
    IDEApplication.start
    1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    1 frame
  22. Equinox Container
    EclipseAppHandle.run
    1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    1 frame
  23. Eclipse OSGi
    EclipseStarter.run
    1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    4 frames
  24. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  25. Equinox
    Main.run
    1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    3. org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    3 frames