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

Created on 20 Apr 2017  路  7Comments  路  Source: facebook/litho

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

bug

Most helpful comment

All 7 comments

@kosiarska Yes, that's definitely the same issue as facebook/yoga#354. It's probably best to follow the progress over there as we can't do anything about it on the Litho side.

Thanks for the report! I'll leave it to @emilsjolander if he wants to keep both issues open.

I met this issue!!!

encountered this issue too on my android 4.2.2 device

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

Haven't seen this since. Closing.

@emilsjolander Excuse me. I got same problem in 0.17.0 and crash on android 4.1.1 device every time. the facebook/yoga@76f6a54 fix has't merged to litho?

fbjni in litho
fbjni in yoga

Was this page helpful?
0 / 5 - 0 ratings

Related issues

just-kip picture just-kip  路  8Comments

pavlospt picture pavlospt  路  5Comments

ooga picture ooga  路  7Comments

Junaid-Sakib picture Junaid-Sakib  路  7Comments

MichaelRocks picture MichaelRocks  路  7Comments