【问题标题】:java.lang.LinkageError: com.facebook.litho.sections.widget.RecyclerCollectionComponentjava.lang.LinkageError: com.facebook.litho.sections.widget.RecyclerCollectionComponent
【发布时间】:2021-10-20 05:56:27
【问题描述】:
java.lang.LinkageError: com.facebook.litho.sections.widget.RecyclerCollectionComponent
使用 litho RecyclerCollectionComponent 时
RecyclerCollectionComponent component = RecyclerCollectionComponent.create(c).section(
section
).setRootAsync(false).disablePTR(true).build();
【问题讨论】:
标签:
linkageerror
litho
facebook-litho
【解决方案1】:
浪费了几天后,我发现这是由于 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'