AboutLibraries
AboutLibraries copied to clipboard
Crash when click on library list item
About this issue
The application crashes when I click on an item in the libraries list. I did the setup as advised in the README for compose and everything works, except this.
The crash stack trace is as follows:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: io.bloco.cabinet, PID: 11300
java.lang.NoSuchMethodError: No direct method <init>(ZZLandroidx/compose/ui/window/SecureFlagPolicy;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V in class Landroidx/compose/ui/window/DialogProperties; or its super classes (declaration of 'androidx.compose.ui.window.DialogProperties' appears in /data/app/~~PP0WmgkZjxFOn-kzodIvrQ==/io.bloco.cabinet-X5CXBLKOo9phUkjHaUyK2w==/base.apk)
at com.mikepenz.aboutlibraries.ui.compose.LibrariesKt.LicenseDialog(Libraries.kt:160)
at com.mikepenz.aboutlibraries.ui.compose.LibrariesKt.Libraries(Libraries.kt:124)
at com.mikepenz.aboutlibraries.ui.compose.LibrariesKt$Libraries$3.invoke(Unknown Source:38)
at com.mikepenz.aboutlibraries.ui.compose.LibrariesKt$Libraries$3.invoke(Unknown Source:10)
at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:145)
at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2367)
at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2634)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3250)
at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3228)
at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:336)
at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3228)
at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3193)
at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:753)
at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1031)
at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:125)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:534)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:503)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:727)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@3da2a67, androidx.compose.ui.platform.MotionDurationScaleImpl@f79a014, StandaloneCoroutine{Cancelling}@90770bd, AndroidUiDispatcher@bb2c6b2]
Details
- [10.4.0] Used library version
- [7.2.2] Used gradle build tools version
- [1.7.10] Kotlin version
- [1.3.0-beta02] Compose version
- [1.3.1] Compose compiler version
- [Chipmunk Patch 2] Used tooling / Android Studio version
Checklist
- ✅ Searched for similar issues
- ✅ Checked out the sample application
- ✅ Read the README
- ✅ Checked out the CHANGELOG
- ✅ Read the MIGRATION GUIDE
Looks like it could be some incompatibility between compose 1.2.0. and 1.3.0?
The library itself is currently still compiled with v1.2.0 as there has not been a stable 1.3.0 release: https://github.com/mikepenz/AboutLibraries/blob/develop/gradle/libs.versions.toml#L16
I downgraded compose to 1.2.0 and still not working 😅 The stack trace is the same.
@LilianaFaustinoBloco so I tried to reproduce the issue within the sample app. But couldn't.
Went ahead and upgraded the dependencies.
The problem starts to appear with Compose 1.3.0-beta02 and compileSDK 33
It does not happen within the sample with compose 1.2.0 and composeCompiler 1.3.1
(with 1.3.0-beta02
compileSDK 33 is also required. Testing the compile upgrade in itself right now)
EDIT: that does not seem to cause the problem. so it seems to be isolated to 1.3.0-beta02
Tried to upgrade all dependencies to see if that could solve the conflicting method signature: https://github.com/mikepenz/AboutLibraries/commit/69e6c1f953a4996f999c5746743c298ff95a1d01
But it looks there is no combination yet which allows that.
It's worth noting that this could be a result from compose-jb
not yet updated to be compatible with 1.3.0-x
Thanks for the effort.
I tried several combos in my dependencies and with these versions everything works:
[1.3.0-alpha03] Compose version [0.25.1] Accompanist version - didn't mention this dependency before
Update: Compsoe 1.3.0-beta03 nor compose-jb 1.2.0-beta01 don't resolve this yet
Update. Looks like Compose 1.3.0-rc01 and compose-jb 1.2.0-beta01 don't play well together yet either 1.2.0-beta03
has some build issues for the android artifacts
Compose-jb 1.2.0 / Compose 1.2.1 and Compose-Compiler 1.3.2 with Kotlin 1.7.20 are compatible with each other.
I'd expect Compose-1.3.x compatible compose-jb versions to be there soon.
I have the same crash, however I use stable versions.
AboutLibraries: 10.5.0
Compose: 1.2.1
Compose Compiler: 1.3.2
Kotlin: 1.7.20
Correction: It seems some dependency uses androidx.compose.ui:ui:1.3.0-rc01
therefor my project also uses this version.
Going to remove the experimental usage of DialogProperties
in the next update, which will fix the crash at the cost of the license dialog being slightly less wide.