JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.85k stars 1.15k forks source link

Jetpack Compose for Desktop Multiplatform Wizard, creates an android app that crashes on launch #576

Open ColtonIdle opened 3 years ago

ColtonIdle commented 3 years ago
2021-04-09 06:10:52.042 24009-24009/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: myapp.android, PID: 24009
    java.lang.IllegalStateException: ViewTreeLifecycleOwner not set for this ComposeView. If you are adding this ComposeView to an AppCompatActivity, make sure you are using AppCompat version 1.3+. If you are adding this ComposeView to a Fragment, make sure you are using Fragment version 1.3+. For other cases, manually set owners on this view by using `ViewTreeLifecycleOwner.set()` and `ViewTreeSavedStateRegistryOwner.set()`.
        at androidx.compose.ui.platform.AbstractComposeView.onAttachedToWindow(ComposeView.android.kt:212)
        at android.view.View.dispatchAttachedToWindow(View.java:20479)

Just looks like a dep has to be updated. Don't know if this is the right place or youtrack.

Screen Shot 2021-04-09 at 6 07 38 AM
okushnikov commented 1 month ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.