Hi everyone, I'm having this issue : ```Unresolved...
# multiplatform
e
Hi everyone, I'm having this issue :
Copy code
Unresolved reference 'RemoveRedEye'.

Icon(
    modifier = Modifier.fillMaxSize(),
    imageVector = Icons.Filled.RemoveRedEye,
    contentDescription = "Voir le produit",
    tint = Color.White
)
While others are well-imported, like this one:
Copy code
Icon(
    modifier = Modifier.fillMaxSize(),
    imageVector = Icons.Outlined.Delete,
    contentDescription = "Supprimer du panier",
    tint = Color.Red
)
c
which icon “pack” do you have in you
dependencies
?
most probably this is your issue:
A separate library,
androidx.compose.material:material-icons-extended
, contains the full set of Material icons. Due to the very large size of this library, make sure to use R8/Proguard to strip unused icons if you are including this library as a direct dependency. Alternatively you can make a local copy (by copy and pasting) the icon(s) you wish to keep, or using Android Studio’s ‘Import vector asset’ feature.
https://developer.android.com/reference/kotlin/androidx/compose/material/icons/package-summary
e
This issue happens in the common main module, and I'm using this library :
Copy code
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Delete
c
but have you added
androidx.compose.material:material-icons-extended
as a dependency to your project? you shared the imports in your source code.
e
Yes, I have already done
But not in the shared module, how should I add it?
c
without knowing your project setup - hard to tell. But Google is your friend, also the JetBrains KMP docs should be helpful and a last resort would be your favorite LLM. 😉
e
Google's
androidx.compose.material:material-icons-core
and
androidx.compose.material:material-icons-extended
are published for Android only
JetBrains published
org.jetbrains.compose.material:material-icons-core
and
org.jetbrains.compose.material/material-icons-extended
for more (but not all) multiplatform targets
ultimately I would suggest converting the icons you actually use, from their source formats, to Compose ImageVectors yourself. there are many tools that can do so, such as https://github.com/ComposeGears/Valkyrie https://github.com/DevSrSouza/svg-to-compose https://composables.com/svg-to-compose
or if you've converted them to Android vector drawables, those are also supported on multiplatform, https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-resources-usage.html#images