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
I am getting crash every time with the datepicker #112
Comments
Seeing the same using compose 1.1.0-alph04> I'm guessing this is because I'm missing a compose animation dependency. Looking to see if that is true... |
Sure enuff, default animation library in use was 1.0.x even though I was using 1.1.0-alpha04. During research I saw that alpha05 is out, which requires kotlin 1.5.31. So changed to both of those and added this to the main kotlin sourceset in the android module:
This changed the exception when using DatePicker to this:
So now I'm looking into where that comes from... |
The 1.0.1 stuff is fixed by changing the gradle entry for animation to "implementation".
But the same error remains when attempting to use date picker even after the 1.0.1 stuff is gone:
Still looking... |
Ok, here's the problem - the method signatures for both slideInVertically and slideOutVertically have changed. Here's slideInVertically now:
Line 134 in date picker is this:
and needs to be (at least) this:
Assuming of course the default animationSpec (now the first argument) is ok. The good news is they've removed to Experimental annotation from both these functions, now they are marked as @stable. Si hopefully they won't change again. So I'm stuck for now. If I can get time, may attempt a pull request later, but I have not looked at the internals of the project much so don't know how much other stuff might pop when going to kotlin 1.5.31 and 1.1.0-alpha05 of compose... |
Thanks for all the investigation and information. I'll try and have a look at upgrading to kotlin 1.5.31 and 1.1.0-alpha05 some time later today but if I don't feel free to submit a PR. |
I started working towards a PR, but am having trouble with the gradle dependencies. Somehow it is pulling in 1.0.0 of animation and animation-core along with the current ones. Until I get that stopped, the build works when it shouldn't... Update: I found this problem, had to add explicit dependencies in a couple places for both animation and foundation layout libraries to get them to be the same version as compose. That stopped whatever was pulling the old libraries and allowing the build to work when it shouldn't. Tomorrow I should be able to do a PR... |
Vanpra, I see you did a pull request for 0.6.1 so I won't do mine. But I think it would be good to add these changes to yours. This makes explicit the dependency on animation and ensures an old one won't be picked up by default: Dependencies.kt add
CommonModulePlugin.kt add dependencies
app\build.gradle.kts add dependencies
Without these, in project view, check external dependencies and see if there are entries for two different versions of the compose animations libraries. The old refs allow the build to succeed even without changing the usage of slideInVertically and slideOutVertically |
Thanks for letting me know. I've added the above lines to the PR. |
This should be fixed in the 0.6.1 release |
The text was updated successfully, but these errors were encountered: