Status Update
Comments
il...@google.com <il...@google.com> #2
ga...@freeletics.com <ga...@freeletics.com> #3
Hi, Thanks for reporting the issue.
Please share screen recording for better understanding.
Please capture the bugreport immediately after the issue and share it.
Please provide a brief description of the issue for better understanding.
Follow the below procedure to capture.
Step 1: Enable Developer Options, USB debugging and Bug Report Shortcut
1.Go to Settings → About Phone a.Tap on “Build Number” seven times (7).
2.Go to Settings → System → Advanced → Developer Options. (Note: In some phones this is embedded in another path. Please search for “USB debugging” in your settings search box if you are unable to find this setting)
a.Enable “USB Debugging”
b.Enable “Bug report shortcut” (allows you to quickly capture bug report by long-pressing power button and selecting “Take bug report”)
Note: Please upload the bug report to google drive and share the folder to
mg...@google.com <mg...@google.com>
Ni...@fressnapf.com <Ni...@fressnapf.com> #4
Please provide the input requested, or the issue would be closed in a week.
mg...@google.com <mg...@google.com> #5
We're closing this issue due to not having enough actionable information. If you continue to have this issue, please file a new issue and add the relevant information along with a reference link to the earlier issue.
mg...@google.com <mg...@google.com> #6
It appears that the custom ProGuard rule was not working as intended across all projects.
However, using public static *** getLocalLifecycleOwner();
(with the wildcard type ***
) seems to work consistently in the sample project and our internal experiments:
-if public class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt {
public static *** getLocalLifecycleOwner();
}
-keep public class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt {
public static *** getLocalLifecycleOwner();
}
We are investigating further, and we will be working on a fix for the issue.
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit 79f5644cb937d950318c3c5ef2aca70ab1413119
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Jun 14 16:34:11 2024
Fix Lifecycle 2.8 custom ProGuard rule
* The custom ProGuard rule was not working as intended across all projects.
* Replacing by `public static *** getLocalLifecycleOwner();` (with the wildcard type `***`) seems to work consistently in all projects.
Fixes:
Test: manual
Change-Id: I4cfdecc0bbfc0be02d66efcee2c63bb5b025dca2
M lifecycle/lifecycle-runtime-compose/proguard-rules.pro
nu...@traderepublic.com <nu...@traderepublic.com> #8
Could you please make an immediate patch release as 2.8.2 crashes with the above exception?
pr...@google.com <pr...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-runtime-compose:2.8.3
androidx.lifecycle:lifecycle-runtime-compose-android:2.8.3
androidx.lifecycle:lifecycle-runtime-compose-desktop:2.8.3
m....@gmail.com <m....@gmail.com> #11
mg...@google.com <mg...@google.com> #12
There was a mix-up, and the Lifecycle 2.8.3 artifacts won't be available until Monday. Sorry for the false alarm.
m....@gmail.com <m....@gmail.com> #13
Seems to be good now. Thanks!
mg...@google.com <mg...@google.com> #14
Lifecycle 2.8.3 is now available on
pe...@mohemian.com <pe...@mohemian.com> #15
I'm still getting "java.lang.IllegalStateException: CompositionLocal LocalLifecycleOwner not present" with 2.8.3 in release builds (with obfuscation enabled). Adding
-keep class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt { *; }
to my ProGuard rules fixes the issue. Any advice?
In my setup I have an app that's using the lifecycle dependencies directly, but some other dependencies of mine also include the same (and these libraries are obfuscated too) - not sure if this makes a difference.
mg...@google.com <mg...@google.com> #16
I'm unable to offer advice since I can't replicate the issue you're experiencing -- but based on your message, it appears Lifecycle "should" be working correctly.
Would you please
pr...@google.com <pr...@google.com> #17
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-runtime-compose:2.9.0-alpha01
androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-alpha01
androidx.lifecycle:lifecycle-runtime-compose-desktop:2.9.0-alpha01
Description
This is basically an follow-up of https://issuetracker.google.com/issues/336842920 .
Component used:
Version used:
Devices/Android versions reproduced on: Android 14
We see the the following crashes directly at app start when using R8 (with default AGP 8.x fullMode enabled): IllegalStateException: CompositionLocal LocalLifecycleOwner not present
We saw the added proguard rules inhttps://android-review.googlesource.com/c/platform/frameworks/support/+/3105647/21/lifecycle/lifecycle-runtime-compose/proguard-rules.pro
Changing them to
fixes the crash.
So it seems the keep rule is currently not sufficient to make 2.8.2 compatible with Compose 1.6 when minify the build.