I updated to latest compose 1.7.0-beta01 for mater...
# compose-android
c
I updated to latest compose 1.7.0-beta01 for material. and now I can't find some of my material icons. Like
androidx.compose.material.icons.filled.Bookmark
does anyone knwo where those went? I am indeed adding material-icons and icons-extended to my module but still no dice.
l
What version did you update from?
c
I'm not sure... because I think previously i was using compose bom... but I needed material navigation so I added that and set it to latest (1.7.0-beta01) and that gave me a bunch of errors in my material icons. So I think most of my icon dependencies are now getting forced onto newer versions (which is fine). but there seems to be some change in terms of what deps i should actually add to my project. and i am admittedly confused. i use r8. so should I just use material-icons and material-icons-extended? or should i be using material-icons-core-android and material-icons-extended-android? i just learned about those. so yeah. Its like. I want this one icon and I feel like i need a flow chart of which dep to use. lol
l
icons-extended depends on icons-core, so you don’t need both. The
-android
suffixes should be picked automatically when you target android, so you don’t need to specify that explicitly
You should only need the
material-icons-extended
dependency, if you are using r8, and you want all icons
c
OHHH. Okay. so i have like 4 deps declared right now. so just
material-icons-extended
lets see if that works... but yes. im using r8 so all the extra icons should be tree shaken
y
There are also some that now have an extra path in them. But I think that was 1.6
For AutoMirror
👀 1
c
So I tried again today and I'm still getting issues. For example, the icon Icons.Automirrored.Outlined.Bookmark doesn't exist in the regular material-icons-extended package. That package should bring in core, and it should have all of the -android icons in it. But it can't resolve that icon after upgrading to 1.7.0-beta01. hmm
y
that one isn't AutoMirrored for me
Try
Copy code
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.VolumeOff
import androidx.compose.material.icons.outlined.Bookmark
...
        Icons.Outlined.Bookmark
        Icons.AutoMirrored.Default.VolumeOff
both from material-icons-extended-android, I assume gradle resolves through the non android one.
c
I downgraded to 1.6.7 and everything works again. weird.
when i have more time ill try to figure out what the difference is between latest stable 1.6.7 and latest beta 1.7.0. maybe @Louis Pullen-Freilich [G] knows already, but if not ill try to file a bug. something seems wonky. maybe i just missed some release notes.
l
I don’t think anything was expected to change here, if you have a sample app / repro please file a bug
That said.. it doesn’t look like
Bookmark
was ever generated as auto mirrored
Is it possible this is defined as an extension by you / some other library you depend on?
c
I don't believe so.
but cool. glad to know that it wasn't intentional. i will try to commit some cycles to filing a bug here. maybe its a legit issue. cheers
l
Out of interest, if you try and resolve the icon with 1.6.7, what does it take you to?
c
Okay. so i maybe mixed up import statements because I had a slew of like 10 imports that were red after updating to 1.7.0-beta01. But basically two examples that were problematic (triple checked them this time) were androidx.compose.material.icons.automirrored.filled.Message and androidx.compose.material.icons.filled.Bookmark Both of those did not work with 1.7.0-beta01. While downgrading to 1.6.7 fixed the issue.
l
But with 1.7.0-beta01, some of the other icons work?
c
Yeah, some of them work. It seems sorta random. Which is how I stumbled upon the matiral-icons-core-android variant and I thought maybe they got moved there.
l
Just tried in a sample project, both of those icons seem to work fine, so not sure what’s going on. If you manage to create a reproduction sample, feel free to file a bug in any case
c
Will do. thank you for the sanity check. i thought i was going crazy
y
Probably worth reversing this thread and start with the sample project next time. Makes it 1000% easier for others to help you.
c
I typically ask about upgrade issues as I encounter them, but definitely agree that sample projects are helpful!
132 Views