java.lang.LinkageError: com.facebook.litho.sections.widget.RecyclerCollectionComponent

63 Views Asked by At
java.lang.LinkageError: com.facebook.litho.sections.widget.RecyclerCollectionComponent

When using litho RecyclerCollectionComponent

RecyclerCollectionComponent component = RecyclerCollectionComponent.create(c).section(
                    section
            ).setRootAsync(false).disablePTR(true).build();
1

There are 1 best solutions below

0
On

After wasting a couple of days I found out this is due to a bug in litho framework, I solved it by using an older version of Litho.

try using

implementation 'com.facebook.litho:litho-core:0.12.0'
implementation 'com.facebook.litho:litho-widget:0.12.0'
compileOnly 'com.facebook.litho:litho-annotations:0.12.0'
annotationProcessor 'com.facebook.litho:litho-processor:0.12.0'
// Sections
implementation 'com.facebook.litho:litho-sections-core:0.12.0'
implementation 'com.facebook.litho:litho-sections-widget:0.12.0'
compileOnly 'com.facebook.litho:litho-sections-annotations:0.12.0'
annotationProcessor 'com.facebook.litho:litho-sections-processor:0.12.0'
// SoLoader
implementation 'com.facebook.soloader:soloader:0.2.0'