https://kotlinlang.org logo
l

lilypuchi

12/19/2020, 6:30 AM
With
1.0.0alpha-09
Since `Dp.VectorConverter` and similar converters have both the deprecated (at
compose.animation
) and relocated version (at
compose.animation.core
) with the same name, I’m getting the Overload resolution ambiguity error and unable to build ahead. 🤔
d

Doris Liu

12/19/2020, 8:03 PM
Sorry about the churn! If you explicitly import
androidx.compose.animation.core.VectorConverter
, and remove the import for
androidx.compose.animation.VectorConverter
, it should fix the resolution ambiguity error. We are doing an overhaul and moving the animations APIs independent of other library groups to animation-core lib (where they really belong). We tried to make this low friction, but unfortunately
ReplaceWith
doesn't work well when the API names are the same. 😓 Please let me know if you still have trouble after applying the suggestion above.
l

lilypuchi

12/20/2020, 4:00 AM
Sorry for the incomplete explanation 🙇 I had actually exlusively imported
core.VectorConverter
and removed the deprecated one. But, I am actually getting the ambiguity while trying to use it with
animatedValue()
(attaching screenshot)
d

Doris Liu

12/20/2020, 4:25 AM
I can't reproduce the issue when creating an
animatedValue
of
Dp
with alpha09, even when I include
androidx.compose.animation.*
in the imports. (I'm using the latest canary w/ alpha09.) I'd recommend doing a clean build and make sure all the libraries are up to date. If that doesn't work, please file a bug with a repro case. In the meantime, as a workaround you could copy the implementation of
Dp.VectorConverter
to your project as a custom
TwoWayConverter
.
👍 1
l

lilypuchi

12/20/2020, 9:21 AM
In the meantime, as a workaround you could copy the implementation of 
Dp.VectorConverter
 to your project as a custom 
TwoWayConverter
.
Yup, I’m using this as a workaround currently. I’ll try out your suggestion. If it doesn’t work still I’ll file a bug 🪲
4 Views