After upgrading Compose from 1.2.1 to 1.3.0-beta01...
# compose
f
After upgrading Compose from 1.2.1 to 1.3.0-beta01. This code can cause crash in release build even minify is disabled.
Copy code
LineHeightStyle(
  alignment = LineHeightStyle.Alignment.Center,
  trim = LineHeightStyle.Trim.None
)
with this error message:
Copy code
java.lang.NoSuchMethodError: No virtual method getCenter-PIaL0Z0()I in class Landroidx/compose/ui/text/style/LineHeightStyle$Alignment$Companion; or its super classes
c
Have you filed a bug yet by chance?
f
It might be related to Gradle. After specifying
ui-text
module explicitly, the problem gone.
c
Weird. Sounds like maybe r8 related, but then again they said in beta01 they made a bunch of changes to Modifier. I wonder if LineStyleHeight also is somehow affected by that.
f
It worked fine in debug build, only affected release build. That’s why I suspected that it was a Gradle /AGP issue.
There is slight change of 1.3.0-beta01's
LineHeightStyle.Alignment
comparing with 1.2.x’s. I didn’t specify
ui-text
module explicitly before. Gradle/AGP might use the old version(1.2.0, transitive of higher level module) of
ui-text
for release build and made this crash happen. (Not very sure)
c
I'd still report a bug. Seems like the very thing thing that could help someone else (or the google team before beta02)
h
beta02 is already cut but please file a bug
f
Sorry for this late reply. But I can’t reproduce the issue with a minimal sample project.