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

java.lang.NoSuchMethodError: 'void sergio.sastre.composable.preview.scanner.core.preview.ComposablePreview.invoke(androidx.compose.runtime.Composer, int)' #1

Closed
sergio-sastre opened this issue Jun 11, 2024 · 1 comment

Comments

@sergio-sastre
Copy link
Owner

sergio-sastre commented Jun 11, 2024

In a Parameterized Screenshot Tests, where AndroidComposablePrevieScanner or JvmAnnotationScanner are used, when calling the preview, it throws an exception.

This is probably because the :core is a kotlin library missing the compose runtime

As a workaround, one can copy :core and either :android or :jvm classes in the module where AndroidComposablePrevieScanner or JvmAnnotationScanner are supposed to be used, as well as the classgraph and reflect dependency, and that should work.

    testImplementation 'org.jetbrains.kotlin:kotlin-reflect:1.9.22'
    testImplementation 'io.github.classgraph:classgraph:4.8.172'
@sergio-sastre
Copy link
Owner Author

Fixed in 0.1.1

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

1 participant