I tried to debug it using an . When I did so, I got a backtrace ending with:
Caused by: java.lang.IllegalArgumentException: Path string cannot be empty.
Turns out my ic_launcher_foreground.xml had some elements with empty android:pathData attributes.
Deleting those empty s made the icon work!