Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in release mode upgrading minSdkVersion from 21 to 23 #727

Open
1 task done
tpucci opened this issue Nov 19, 2020 · 1 comment
Open
1 task done

Issue in release mode upgrading minSdkVersion from 21 to 23 #727

tpucci opened this issue Nov 19, 2020 · 1 comment

Comments

@tpucci
Copy link

tpucci commented Nov 19, 2020

Version

    versions = [
            litho                             : "0.39.0"
...
    dependencies = [
            litho_annotation_processor          : "com.facebook.litho:litho-processor:${versions.litho}",
            litho_core                          : "com.facebook.litho:litho-core:${versions.litho}",
            litho_fresco                        : "com.facebook.litho:litho-fresco:${versions.litho}",
            litho_sections_annotations          : "com.facebook.litho:litho-sections-annotations:${versions.litho}",
            litho_sections_annotations_processor: "com.facebook.litho:litho-sections-processor:${versions.litho}",
            litho_sections_core                 : "com.facebook.litho:litho-sections-core:${versions.litho}",
            litho_sections_widget               : "com.facebook.litho:litho-sections-widget:${versions.litho}",
            litho_widget                        : "com.facebook.litho:litho-widget:${versions.litho}",

✅ Proguard is OFF

...
        release {
            minifyEnabled false
            shrinkResources false

Issues and Steps to Reproduce

  • Set minSdkVersion to 21.
  • In your code, mount a litho view.
  • Build and run in debug mode: OK ✅
  • Build and run in release mode: OK ✅
  • Upgrade minSdkVersion from 21 to 23.
  • Build and run in release mode: KO ❌.

Crash:

error java.lang.ClassNotFoundException: com.facebook.jni.HybridData$Destructor
...
java.lang.NoClassDefFoundError: com.facebook.yoga.YogaNative
	at com.facebook.yoga.YogaNative.jni_YGConfigFree(Native Method)
	at com.facebook.yoga.YogaConfig.finalize(Unknown Source:2)
...

Expected Behavior

No crash.

Workaround

This issue seems related to #625
Adding implementation 'com.facebook.fbjni:fbjni:0.0.2' fixes this issue.
However, I don't understand why changing minSdkVersion from 21 to 23 breaks things.

@sherrif10
Copy link

Have you tried upgrading to 22 of miniSdkVersion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants