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

[BUG] java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; #349

Open
FunkyMuse opened this issue Jul 16, 2024 · 11 comments

Comments

@FunkyMuse
Copy link

FunkyMuse commented Jul 16, 2024

Describe the bug
When going back from a destination (scene) the app crashes with

To Reproduce
Use Compose multiplatform 1.7.X-alpha or dev
navigate from a destination, go back
crash, not always

Expected behavior
User should be returned to the destination safely

Minimal reproducible example
I guess that's something introduced in 1.7.X Compose multiplatform that breaks the library

stack trace is

java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in /data/app/~~49ENzoh7ld7afOHMt_9WzA==/com.x.x.debug-AIZoxjVS9E177qpLp0l5xQ==/base.apk)
                                                                                                    	at moe.tlaster.precompose.navigation.NavHostKt$NavHost$6.invoke(NavHost.kt:191)
                                                                                                    	at moe.tlaster.precompose.navigation.NavHostKt$NavHost$6.invoke(NavHost.kt:140)
@Tlaster
Copy link
Owner

Tlaster commented Jul 16, 2024

Yes compose 1.7.x change the SeekableTransitionState's API, which I will update to use the new version after 1.7.x has been released.

@FunkyMuse
Copy link
Author

Yes compose 1.7.x change the SeekableTransitionState's API, which I will update to use the new version after 1.7.x has been released.

1.7.X is in alpha now, maybe a PreCompose alpha/beta release too?

@emirhanemmez
Copy link

it would be great if you fix that bug :) thanks for your effort

@mobiletoly
Copy link

any news on having it fixed? and thank you for a great library!

@Tlaster
Copy link
Owner

Tlaster commented Oct 1, 2024

PreCompose 1.7.0-alpha01 is out with compose multiplatform 1.7.0-beta02 support, which should resolve the issue.

@mobiletoly
Copy link

I saw that precompose 1.7.0-alpha02 was released, but after adding it - I'm getting error:

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':composeApp:transformNativeMainCInteropDependenciesMetadataForIde'.
> Could not resolve all files for configuration ':composeApp:nativeMainResolvableDependenciesMetadata'.
   > Could not find moe.tlaster:precompose-viewmodel:1.7.0-alpha02.
     Required by:
         project :composeApp
   > Could not find moe.tlaster:precompose-koin:1.7.0-alpha02.
     Required by:
         project :composeApp

I don't have the same issue is with 1.7.0-alpha01

@Tlaster
Copy link
Owner

Tlaster commented Oct 8, 2024

I saw that precompose 1.7.0-alpha02 was released, but after adding it - I'm getting error:

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':composeApp:transformNativeMainCInteropDependenciesMetadataForIde'.
> Could not resolve all files for configuration ':composeApp:nativeMainResolvableDependenciesMetadata'.
   > Could not find moe.tlaster:precompose-viewmodel:1.7.0-alpha02.
     Required by:
         project :composeApp
   > Could not find moe.tlaster:precompose-koin:1.7.0-alpha02.
     Required by:
         project :composeApp

I don't have the same issue is with 1.7.0-alpha01

moe.tlaster:precompose-viewmodel is no longer used and replaced by org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose, this is a major change for 1.7.0-alpha02, you can still keep 1.7.0-alpha01 if you're not ready to migrate to Jetpack's ViewModel.
https://github.com/Tlaster/PreCompose/releases/tag/1.7.0-alpha02

@mobiletoly
Copy link

mobiletoly commented Oct 9, 2024

oh OK, thank you, completely forgot to take a look at release notes. luckily for me migration should be pretty straightforward, especially because I recently discovered that PreCompose/Molecule is in most cases better choice for me than using ViewModel approach.

@andrearossini-bf
Copy link

andrearossini-bf commented Nov 13, 2024

Does 1.7.0-alpha03 work on iOS? Because for me it causes a crash at startup. I used 03 because I read that it contains iOS fixes.

@misskbar
Copy link

Any updates with this issue?

@andrearossini-bf
Copy link

Yes actually it works, mine was just some other plugins' conflict. I suggest to verify carefully all plugins' compatibility, eventually disabling and reintegrating them gradually.

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

6 participants