Overload resolution ambiguity. All these functions...
# compose-desktop
v
Overload resolution ambiguity. All these functions match. How can we resolve this issue?
m
Is it possible to use an type alias?
v
not sure, getting while adding
Copy code
rememberScrollbarAdapter
i
Please provide a bit more information on how you're trying to use it. Currently, I only see the function name, but it's not enough to understand what the problem is and provide help.
a
Use the full name of the function, including the package name.
v
for v2 it says unresolved reference
a
Post the code here, with includes
Preferably a short example
v
image.png
a
Delete the imports and put the full method name in the code itself.
Use the
v2
one.
Use the
v2
one.
err, sorry, no v2
There’s no
v2.rememberScrollbarAdapter
Is it possible you have two different versions of Compose in your project?
v
Can you please help me. This are my configurations and version
a
Run the gradle “dependencies” task on your project and look if you have more than one version of Compose.
v
ok
a
compose = “1.5.4”
compose-compiler = “1.5.5"
foundationDesktop = “1.6.0-rc01”
compose-plugin = “1.6.0-alpha01"
This is suspect
You shouldn’t be using a different “foundation” lib
👍 1
I’m not totally sure what “foundation-desktop” is, even
v
a
I don’t think you should be using it.
and the compiler version should also match the compose version. In fact, you don’t need to declare it separately.
v
ok, cool thanks. This got resolved by removing the dependency. Tho i can only use the scroll on desktopMain source set. How can i have it in commonMain?
a
Scrollbars aren’t available on Android. Scrolling itself works, of course.
v
commonMain: ItemListView -> android and ios without scroll desktopMain: ItemListView -> jvmDesktop with scroll bar How can i do this?
a
With expect/actuals
👍 1
v
Thanks it worked