litho
litho copied to clipboard
Failed to compile with React Native
- [x] I have searched existing issues and this is not a duplicate
Version
React Native: 0.60.3 Litho: 0.29.0
configurations.all {
exclude group: 'com.facebook.yoga', module: 'yoga'
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "com.facebook.react:react-native:+" // From node_modules
// Litho
implementation 'com.facebook.litho:litho-core:0.29.0'
implementation 'com.facebook.litho:litho-widget:0.29.0'
annotationProcessor 'com.facebook.litho:litho-processor:0.29.0'
// SoLoader
implementation 'com.facebook.soloader:soloader:0.5.1'
}
Issues and Steps to Reproduce
It prompts below error message that complains conflicts on DoNotStrip
AGPBI: {"kind":"error","text":"Program type already present: com.facebook.proguard.annotations.DoNotStrip","sources":[{}],"tool":"D8"}
FAILURE: Build failed with an exception.
This seems like a duplicate of #224. Can you try suggested config and reach back if it works or not?
configurations.all {
exclude group: 'com.facebook.yoga', module: 'yoga'
exclude group: 'com.facebook.litho', module: 'litho-annotations'
}
Thank you for looking into this issue.
By adding exclude group: 'com.facebook.litho', module: 'litho-annotations'
, it still doesn't work, but shows below error message instead:
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not instantiate annotation processor 'com.facebook.litho.specmodels.processor.ComponentsProcessor'
Got the same issue with
Execution failed for task ':adaptiveLitho:compileDebugJavaWithJavac'.
> Could not instantiate annotation processor 'com.facebook.litho.specmodels.processor.ComponentsProcessor'
RN: 0.61.5 Litho: 0.33.0
compiles after comment out the exclusion of infef-annotation but hit with another issue
configurations.all {
exclude group: 'com.facebook.yoga', module: 'yoga'
// exclude group: 'com.facebook.infer.annotation', module: 'infer-annotation'
exclude group: 'com.google.code.findbugs', module: 'jsr305'
}