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

Exception runtime #488

Closed
1 task done
jerboy opened this issue Feb 1, 2019 · 5 comments
Closed
1 task done

Exception runtime #488

jerboy opened this issue Feb 1, 2019 · 5 comments

Comments

@jerboy
Copy link

jerboy commented Feb 1, 2019

Version

***Add the version of the litho packages you use. You can paste the dependency

dependencies {
  // ...
  // Litho
  implementation 'com.facebook.litho:litho-core:0.23.0'
  implementation 'com.facebook.litho:litho-widget:0.23.0'
  compileOnly 'com.facebook.litho:litho-annotations:0.23.0'

  annotationProcessor 'com.facebook.litho:litho-processor:0.23.0'

  // SoLoader
  implementation 'com.facebook.soloader:soloader:0.5.1'

  // For integration with Fresco
  implementation 'com.facebook.litho:litho-fresco:0.23.0'

  // For testing
  testImplementation 'com.facebook.litho:litho-testing:0.23.0'
}

Issues and Steps to Reproduce

Runtime Exception

02-01 15:50:45.903 15915 15915 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/litho/annotations/Comparable;
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.ComponentUtils.hasEquivalentFields(SourceFile:47)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.Component.isEquivalentTo(SourceFile:174)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.common.SingleComponentSection.isEquivalentTo(SourceFile:94)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.SectionLifecycle.shouldUpdate(SourceFile:186)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.SectionLifecycle.shouldComponentUpdate(SourceFile:160)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.ChangeSetState.generateChangeSetRecursive(SourceFile:202)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.ChangeSetState.generateChildrenChangeSets(SourceFile:413)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.ChangeSetState.generateChangeSetRecursive(SourceFile:303)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.ChangeSetState.generateChangeSet(SourceFile:116)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.SectionTree.calculateNewChangeSet(SourceFile:1404)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.SectionTree.applyNewChangeSet(SourceFile:984)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.SectionTree.access$100(SourceFile:76)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.sections.SectionTree$CalculateChangeSetRunnable.tracedRun(SourceFile:221)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.facebook.litho.ThreadTracingRunnable.run(SourceFile:89)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6680)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-01 15:50:45.903 15915 15915 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
@jerboy
Copy link
Author

jerboy commented Feb 1, 2019

should I modify build.gradle

 implementation 'com.facebook.litho:litho-annotations:0.23.0'

instead of

compileOnly 'com.facebook.litho:litho-annotations:0.23.0'

@drd @dreiss @javache @krschultz

@passy
Copy link
Member

passy commented Feb 13, 2019

@marco-cova Is that a chance that came from the reflection-based prop comparison?

@marco-cova
Copy link
Contributor

Yes, looks like the Comparable interface is not found in your build for some reason. I would check ProGuard's configuration or anything you use to strip out classes.

@passy
Copy link
Member

passy commented Feb 17, 2019

@marco-cova - @jerboy's comment seems correct in that case. If annotations are now required at runtime, they need to be marked as implementation.

@marco-cova
Copy link
Contributor

Fixed with ec67371. Thanks for reporting.

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

3 participants