question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoClassDefFoundError: com/facebook/jni/Countable when load liblib_fb_fbjni.so in Andorid 4.1

See original GitHub issue

Issues and Steps to Reproduce

  1. Create new android project.
  2. Add dependencies to gradle:
    compile 'com.facebook.litho:litho-core:0.2.0'
    compile 'com.facebook.litho:litho-widget:0.2.0'
    provided 'com.facebook.litho:litho-annotations:0.2.0'

    annotationProcessor 'com.facebook.litho:litho-processor:0.2.0'

    // SoLoader
    compile 'com.facebook.soloader:soloader:0.2.0'
  1. Create simple text component in MainActivity:
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    final ComponentContext context = new ComponentContext(this);

    final Component component = Text.create(context)
        .text("Hello World")
        .textSizeDip(50)
        .build();

    setContentView(LithoView.create(context, component));
}
  1. Create custom Application class:
public class MyApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        SoLoader.init(this, false);
    }
}
  1. Run app

Expected Behavior

App should display hello world

Link to Code

Stacktrace: https://pastebin.com/yjSNTe6T

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
emilsjolandercommented, Apr 26, 2017

https://github.com/facebook/yoga/commit/76f6a54327837bd1d791528409b9b0704e37bb76 should fix it. I’ll create a new release on friday

2reactions
emilsjolandercommented, Apr 26, 2017

@kosiarska I’ve re-opened facebook/yoga#354. Investigating now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android error randomly java.lang.NoClassDefFoundError
It seems to fail after an invocation of a Utility's static method from loadAppSettingsAsync, that happens to be a static method within the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found