Fix for app crash on release builds#317
Merged
aritra-tech merged 1 commit intoaritra-tech:developfrom Jan 4, 2024
Merged
Conversation
Issue aritra-tech#295 and # 234
Owner
|
Thanks @jaison043 for fix it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #295 and # 234
App currently crashes on release builds and works fine on debug builds. This can be reproduced locally by enabling debugging on release builds.
Here is the logcat from release build with debugging enabled
18:22:38.803 E FATAL EXCEPTION: main Process: com.aritra.notify, PID: 9277 java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/compose/runtime/PrimitiveSnapshotStateKt; at androidx.compose.animation.EnterExitTransitionKt.<clinit>(EnterExitTransition.kt:942) at com.aritra.notify.navigation.NotifyAppKt$NotifyApp$2.invoke(NotifyApp.kt:86) at com.aritra.notify.navigation.NotifyAppKt$NotifyApp$2.invoke(NotifyApp.kt:83) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228) at androidx.compose.material3.ScaffoldKt$ScaffoldLayout$1$1$1$bottomBarPlaceables$1.invoke(Scaffold.kt:195) at androidx.compose.material3.ScaffoldKt$ScaffoldLayout$1$1$1$bottomBarPlaceables$1.invoke(Scaffold.kt:194) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:172) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:475) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35) at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:78) at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3243) at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3176) at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:654) at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1041) at androidx.compose.runtime.ComposerImpl$CompositionContextImpl.composeInitial$runtime_release(Composer.kt:3539) at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:562) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcomposeInto(SubcomposeLayout.kt:495) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:468) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:459) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState.subcompose(SubcomposeLayout.kt:443) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$Scope.subcompose(SubcomposeLayout.kt:807) at androidx.compose.material3.ScaffoldKt$ScaffoldLayout$1$1$1.invoke(Scaffold.kt:194) at androidx.compose.material3.ScaffoldKt$ScaffoldLayout$1$1$1.invoke(Scaffold.kt:128) at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:373) at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1$measure-3p2s80s$$inlined$createMeasureResult$2.placeChildren(SubcomposeLayout.kt:892) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:378) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:370) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:131) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:473) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release(OwnerSnapshotObserver.kt:83) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.layoutChildren(LayoutNodeLayoutDelegate.kt:370) 18:22:38.806 E at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.onNodePlaced$ui_release(LayoutNodeLayoutDelegate.kt:514) at androidx.compose.ui.node.InnerNodeCoordinator.placeAt-f8xVGno(InnerNodeCoordinator.kt:160) at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:337) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$placeOuterCoordinator$1.invoke(LayoutNodeLayoutDelegate.kt:708) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$placeOuterCoordinator$1.invoke(LayoutNodeLayoutDelegate.kt:703) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:131) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:473) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:98) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.placeOuterCoordinator-f8xVGno(LayoutNodeLayoutDelegate.kt:703) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:680) at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:337) at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:225) at androidx.compose.foundation.layout.BoxKt.placeInBox(Box.kt:185) at androidx.compose.foundation.layout.BoxKt.access$placeInBox(Box.kt:1) at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$measure$2.invoke(Box.kt:125) at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$measure$2.invoke(Box.kt:124) at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:373) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:378) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:370) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:131) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:473) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release(OwnerSnapshotObserver.kt:83) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.layoutChildren(LayoutNodeLayoutDelegate.kt:370) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.onNodePlaced$ui_release(LayoutNodeLayoutDelegate.kt:514) at androidx.compose.ui.node.InnerNodeCoordinator.placeAt-f8xVGno(InnerNodeCoordinator.kt:160) at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer(Placeable.kt:337) at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer$default(Placeable.kt:288) at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier$measure$1.invoke(GraphicsLayerModifier.kt:648) at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier$measure$1.invoke(GraphicsLayerModifier.kt:647) at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:373) at androidx.compose.ui.node.LayoutModifierNodeCoordinator.placeAt-f8xVGno(LayoutModifierNodeCoordinator.kt:172) 18:22:38.807 E at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer-aW-9-wM(Placeable.kt:337) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$placeOuterCoordinator$1.invoke(LayoutNodeLayoutDelegate.kt:710) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$placeOuterCoordinator$1.invoke(LayoutNodeLayoutDelegate.kt:703) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:131) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:473) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:98) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.placeOuterCoordinator-f8xVGno(LayoutNodeLayoutDelegate.kt:703) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:680) at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelativeWithLayer(Placeable.kt:337) at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelativeWithLayer$default(Placeable.kt:268) at androidx.compose.ui.layout.RootMeasurePolicy$measure$2.invoke(RootMeasurePolicy.kt:43) at androidx.compose.ui.layout.RootMeasurePolicy$measure$2.invoke(RootMeasurePolicy.kt:39) at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:373) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:378) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$layoutChildren$1$1.invoke(LayoutNodeLayoutDelegate.kt:370) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:131) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:473) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release(OwnerSnapshotObserver.kt:83) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.layoutChildren(LayoutNodeLayoutDelegate.kt:370) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.onNodePlaced$ui_release(LayoutNodeLayoutDelegate.kt:514) at androidx.compose.ui.node.InnerNodeCoordinator.placeAt-f8xVGno(InnerNodeCoordinator.kt:160) at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:337) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$placeOuterCoordinator$1.invoke(LayoutNodeLayoutDelegate.kt:708) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate$placeOuterCoordinator$1.invoke(LayoutNodeLayoutDelegate.kt:703) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:131) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:473) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:230) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:98) 18:22:38.815 E at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.placeOuterCoordinator-f8xVGno(LayoutNodeLayoutDelegate.kt:703) at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:680) at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34) at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative(Placeable.kt:337) at androidx.compose.ui.layout.Placeable$PlacementScope.placeRelative$default(Placeable.kt:201) at androidx.compose.ui.node.LayoutNode.place$ui_release(LayoutNode.kt:903) at androidx.compose.ui.node.MeasureAndLayoutDelegate.remeasureAndRelayoutIfNeeded(MeasureAndLayoutDelegate.kt:475) at androidx.compose.ui.node.MeasureAndLayoutDelegate.access$remeasureAndRelayoutIfNeeded(MeasureAndLayoutDelegate.kt:39) at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout(MeasureAndLayoutDelegate.kt:352) at androidx.compose.ui.platform.AndroidComposeView.onLayout(AndroidComposeView.android.kt:1026) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at androidx.compose.ui.platform.AbstractComposeView.internalOnLayout$ui_release(ComposeView.android.kt:322) at androidx.compose.ui.platform.AbstractComposeView.onLayout(ComposeView.android.kt:313) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729) at android.widget.LinearLayout.onLayout(LinearLayout.java:1638) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at com.android.internal.policy.DecorView.onLayout(DecorView.java:789) at android.view.View.layout(View.java:24421) at android.view.ViewGroup.layout(ViewGroup.java:6440) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4258) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3583) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348) at android.view.Choreographer.doCallbacks(Choreographer.java:952) at android.view.Choreographer.doFrame(Choreographer.java:882) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.compose.runtime.PrimitiveSnapshotStateKt" on path: DexPathList[[zip file "/data/app/~~9ZXbO6ukX11BsHllW24z9w==/com.aritra.notify-Bffq5-SwSw0R5sJSyiKnaw==/base.apk"],nativeLibraryDirectories=[/data/app/~~9ZXbO6ukX11BsHllW24z9w==/com.aritra.notify-Bffq5-SwSw0R5sJSyiKnaw==/lib/arm64, /data/app/~~9ZXbO6ukX11BsHllW24z9w==/com.aritra.notify-Bffq5-SwSw0R5sJSyiKnaw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) 18:22:38.818 E at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) ... 159 more ---------------------------- PROCESS ENDED (9277) for package com.aritra.notify ----------------------------