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


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

当使用litho RecyclerCollectionComponent

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

在浪费了几天之后,我发现这是由于litho框架中的一个错误,我用旧版本的Litho解决了这个问题。

尝试使用

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'