Hello guys, i triyng use androidx.compose.materia...
# compose
g
Hello guys, i triyng use androidx.compose.materialmaterial icons extended1.6.1 on compose multiplataform, but i facing this error
:composeApp:iosArm64Main: Could not resolve androidx.compose.material:material-icons-extended:1.6.1.
Someon can help me please?
j
The Jetpack Compose (= Android) one is called https://mvnrepository.com/artifact/androidx.compose.material/material-icons-extended but the JetBrains Compose (= multiplatform) one is called https://mvnrepository.com/artifact/org.jetbrains.compose.material/material-icons-extended. Based on the error, you're using the Android one but should be using the
org.jetbrains.compose
one.
Btw: both versions mention "It is a very large dependency and should not be included directly.", JFYI
g
Im getting the same error
j
You now changed the Maven repository, that won't work. Revert the change inside the
repositories{}
block. Instead, change the package in the other file, the
libs.versions.toml
.
So
.. module = "androidx.compose.material:material-icons-extended"
becomes
.. module = "org.jetbrains.compose.material:material-icons-extended"
g
It worked, thanks 😄, you gave some tutorial how use extendend icons in multiplatform or on android?
ITs not showing any icon now
s
Typicaly you just add:
Copy code
implementation(compose.materialIconsExtended)
to your
commonMain
dependencies. It's part of the compose plugin.
Don't listen to the autocomplete. All of the icons are extensions and sometimes the IDE doesn't find them or takes a really long time. Just type the one you want and it should give the option to add the import.
âž• 1
g
Worked, thanks so much😄
569 Views