-
Notifications
You must be signed in to change notification settings - Fork 4k
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 with ViewModel 2.8 #2677
Comments
Thanks for filing. This looks awfully similar to #2314, and I believe it's actually the same bug, caused by a revert of the fix on the Google side. At the time, the fix was implemented in Lifecycle 2.5.0-rc02: https://android-review.googlesource.com/c/platform/frameworks/support/+/2108693/1/lifecycle/lifecycle-viewmodel/src/main/java/androidx/lifecycle/ViewModelProvider.kt#189 The key part was the addition of a try catch ("AGP has some desugaring issues associated with compileOnly dependencies") In February, this change landed, migrating the code to KMP and seemingly not backporting the fix: https://android-review.googlesource.com/c/platform/frameworks/support/+/2966765/18/lifecycle/lifecycle-viewmodel/src/androidMain/kotlin/androidx/lifecycle/ViewModelProvider.android.kt#b179 |
I am having the same issue, but the crash didn't happen for me on Android 14, but when I tried it with older versions it crashed. |
The same issue hopefully they fix it as well I am going to comment on the issue as well ... Was thinking first what's going on till I got it 😅 and than landed here, after searching the problem! |
Fixed here, not sure when that'll get released: https://android-review.googlesource.com/c/platform/frameworks/support/+/3096018 lifecycle 2.8.1 was just released today, so hopefully this goes into next release... in 2 weeks? |
… bug with androidx viewmodel. See https://issuetracker.google.com/issues/341792251 and square/leakcanary#2677
… bug with androidx viewmodel. See https://issuetracker.google.com/issues/341792251 and square/leakcanary#2677
Description
LeakCanary is not working with ViewModel 2.8, causing crash
Steps to Reproduce
Expected behavior: Not crashing
Version Information
Additional Information
The text was updated successfully, but these errors were encountered: