I am trying to do an example from a book using android compose but are having problems with the import of the icon image .
According to the example I should use "import androidx..compose.material.icons.filled.Home" but Android Studio gives error on the "icons" part. I understand that there has been some changes on how icons are handled but according to documentation using the icon library should still work even if it is not recommended. I am using Android studio Quail 1 as IDE
The icons aren't part of Material 3. They are in a separate library, material-icons-core.Add it to your app's build.gradle.kts
dependencies {
implementation("androidx.compose.material:material-icons-core:1.7.8")
}
Sync Gradle and the import works
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Home
If the book uses icons that aren't in the core set, use material-icons-extended instead
Emmanuel Obiechina Ikenna