https://kotlinlang.org logo
#compose
Title
# compose
a

Adam Bennett

09/10/2020, 9:09 AM
Is anyone else seeing this issue with the MdcTheme?
Copy code
java.lang.NoSuchMethodError: No static method MdcTheme(Landroid/content/Context;ZZZZLkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V in class Lcom/google/android/material/composethemeadapter/MdcTheme; or its super classes (declaration of 'com.google.android.material.composethemeadapter.MdcTheme' appears in /data/app/co.cuvva.design.app-LxFTTKv0lEIaA4yoLB_eJw==/base.apk)
        at co.cuvva.design.app.common.CategoriesActivityKt.DesignAppTheme(CategoriesActivity.kt:59)
        at co.cuvva.design.app.common.CategoriesActivityKt.access$DesignAppTheme(Unknown Source:0)
        at co.cuvva.design.app.common.CategoriesActivity$onCreate$1.invoke(CategoriesActivity.kt:42)
        at co.cuvva.design.app.common.CategoriesActivity$onCreate$1.invoke(Unknown Source:10)
        at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:142)
        at androidx.compose.runtime.internal.ComposableLambda.invoke(Unknown Source:10)
        at androidx.compose.ui.selection.SelectionContainerKt$SelectionContainer$3$1.invoke(SelectionContainer.kt:88)
        at androidx.compose.ui.selection.SelectionContainerKt$SelectionContainer$3$1.invoke(Unknown Source:10)
        at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:142)
        at androidx.compose.runtime.internal.ComposableLambda.invoke(Unknown Source:10)
Compose alpha02, MDC adapter alpha01
s

Sergey Y.

09/10/2020, 9:55 AM
Mdc adapter uses older compose build. As far as I noticed they're not compatible. I had similar issue when tried to use compose alpha02 alongside CoilImageView based on alpha01.
a

Adam Bennett

09/10/2020, 9:56 AM
Yeah that’s what I wondered, it seemed odd to release alpha02 and leave MDC adapter on alpha01. Guess I’ll need to wait for an update
s

Sergey Y.

09/10/2020, 10:03 AM
There is a merge request with update to alpha02. Hope it will be merged soon
👍 1
a

Adam Bennett

09/10/2020, 10:03 AM
Thank you, mysterious Android developer
👍 1
s

Sergey Y.

09/10/2020, 10:05 AM
you are welcome
😂 1
n

nickbutcher

09/10/2020, 2:45 PM
Ah sorry, just assigned appropriate reviews.
🙌 1