Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash at runtime / dependency issue after update ? #5

Open
jscti opened this issue Sep 8, 2024 · 7 comments
Open

Crash at runtime / dependency issue after update ? #5

jscti opened this issue Sep 8, 2024 · 7 comments

Comments

@jscti
Copy link

jscti commented Sep 8, 2024

Hi There

I updated all my dependencies and I'm having a crash when any Dialog opens :

 java.lang.NoSuchMethodError: No static method BasicAlertDialog(Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/window/DialogProperties;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/material3/AndroidAlertDialog_androidKt; or its super classes (declaration of 'androidx.compose.material3.AndroidAlertDialog_androidKt' appears in com.michaelflisar.composedialogs.core.copied.AlertDialogKt.AlertDialog-ra1Y9rQ(AlertDialog.kt:41)
                                                                                                    	at com.michaelflisar.composedialogs.core.internal.ComposeAlertDialogKt.ComposeAlertDialog(ComposeAlertDialog.kt:195)
                                                                                                    	at com.michaelflisar.composedialogs.core.internal.ComposeAlertDialogKt.ComposeAlertDialog(ComposeAlertDialog.kt:51)
                                                                                                    	at com.michaelflisar.composedialogs.core.DialogKt.Dialog(Dialog.kt:70)
                                                                                                    	at com.michaelflisar.composedialogs.dialogs.list.DialogListKt.DialogList(DialogList.kt:182)
                                                                                                    	at com.michaelflisar.composedialogs.dialogs.list.DialogListKt.DialogList(DialogList.kt:81)

...

I don't know if I updated something I shouldn't have or if there is any conflict somehow, do you have an idea ?

My versions right know :

    ext.version_kotlin = '1.9.23'
    ext.version_android_gradle_plugin = '8.6.0'
    ext.version_core = '1.13.1'
    ext.version_compose = '1.7.0'
    ext.version_app_compat = '1.7.0'
    ext.version_kotlin_coroutines = '1.8.1'
    ext.version_lifecycle_extensions = '2.4.1'
    ext.version_moshi = '1.15.1'
    ext.version_room = '2.6.1'
    ext.version_navigation = '2.6.0-alpha02'
    ext.version_retrofit = '2.11.0'
    ext.version_retrofit_coroutines_adapter = "0.9.2"
    ext.version_androidx_preferences = '1.2.1'
    ext.version_work = '2.9.1'
    ext.version_glance = '1.1.0'
    ext.version_mflisar_bom = '2024.03.00'
    ext.billing_version = '7.0.0'
    ext.version_mflisar_compose_dialogs = '1.0.8'
    ext.version_mflisar_compose_preferences = '0.4.7'



buildFeatures {
    compose = true
}

composeOptions {
    kotlinCompilerExtensionVersion = "1.5.12"
}

Cleaned-up / rebuilt / gradle gradle cleaned.

Thanks

@jscti
Copy link
Author

jscti commented Sep 11, 2024

@MFlisar If I downgrade my app "material3" version from 1.3.0 to 1.2.1, it works again.
But I need [email protected] :/

I don't get why it conflicts

@MFlisar
Copy link
Owner

MFlisar commented Sep 12, 2024

I do use some @OptIn apis here:

... those are not binary compatible and that's why you see a crash...

I will make an update this weekend, I probably can remove any non stable api usage in the meantime.

@jscti
Copy link
Author

jscti commented Sep 21, 2024

Any news on this ? Or workaround ?
Thanks 🙏

@MFlisar
Copy link
Owner

MFlisar commented Sep 24, 2024

Next version will be a kotlin multiplatform version with compose multiplatform. I checked its current state and sadly, the latest stable version is still using material 1.2.1. I will wait for the next compose multiplatform version before I make a new update.

You can still simply fork this repository, update the dependency, and make the adjustments (there should not be much to do, I assume it's just API adjustments in the copied classes). Then you can even use it directly from your github repository through jitpack...

@jscti
Copy link
Author

jscti commented Sep 25, 2024

Ok

I just downgraded/rollbacked a few changes to stay on [email protected] on my side
Still it's strange gradle didn't warn me at compile time in any way and let app crashing at runtime

Thanks

@KarolCieslar
Copy link

Same issue

@MFlisar
Copy link
Owner

MFlisar commented Oct 22, 2024

I'm currently rewriting the library to KMP 1.7.0, so it will be updated very soon - next version will be using material3 1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants