I have moved some of my Compose code from Android app into shared code to re-use on iOS. Having an issue running the Android app. I get a crash when trying to use OutlinedTextField from material3. Specifically trying to set colors with TextFieldDefaults. The error is:
Copy code
java.lang.NoSuchMethodError: No virtual method outlinedTextFieldColors-l59Burw(JJJJJLandroidx/compose/foundation/text/selection/TextSelectionColors;JJJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Landroidx/compose/material3/TextFieldColors; in class Landroidx/compose/material3/TextFieldDefaults; or its super classes (declaration of 'androidx.compose.material3.TextFieldDefaults' appears in /data/app/~~FYGMycCQdYFPIoh1dtOFsA==/com.webappclouds.salonbiz-F3ecxD59PfZsacrUUWg4Gg==/base.apk)
Like it is not included in the multiplatform compose. Odd is that it does build just fine. If I try to use the material (2) version, it works but not all the colors are being changed like I ask for.
In the shared library I am using 1.5.0-dev1071 and in the main android app I am using 1.5.0-beta02 (and material 1.2.0-alpha02).
Is this perhaps a known issue.
👍 1
n
Nikolay Rykunov
06/21/2023, 12:52 PM
Seems like the issue is that
1.5.0-dev1071
version of Compose Multiplatform supports only material3
1.0.1
, so 1.2.0-alpha02 may not work there
t
tylerwilson
06/21/2023, 1:30 PM
😞
tylerwilson
06/21/2023, 1:35 PM
I am curious, how did you determine the material3 version? Is it listed somewhere on the repo?