leavesCZY / Matisse

A Image/Video Selector Implemented with Jetpack Compose(一个用 Jetpack Compose 实现的 Android 图片视频选择框架)
https://github.com/leavesCZY/Matisse/wiki
Apache License 2.0
768 stars 60 forks source link

混淆后崩溃 #62

Closed iLucasLiu closed 5 months ago

iLucasLiu commented 6 months ago

您好,2.0.1版本,打包混淆时需要把哪些文件禁止混淆么?现在遇见正常AS运行正常使用,但混淆打包后的apk,点开就失败了。

leavesCZY commented 6 months ago

不需要呀,你提供下具体的堆栈信息吧

iLucasLiu commented 6 months ago

---java.lang.IncompatibleClassChangeError: Found interface androidx.compose.ui.graphics.drawscope.DrawScope, but class was expected androidx.compose.ui.graphics.drawscope.DrawScope.drawRect-n-J9OG0$default(DrawScope.kt:26) androidx.compose.foundation.BackgroundNode.drawRect(Background.kt:31) androidx.compose.foundation.BackgroundNode.draw(Background.kt:8) androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:48) androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:21) androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:34) androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:1) androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke(NodeCoordinator.kt:2) androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke(NodeCoordinator.kt:1) androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:64) androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:46) androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:107) androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:2) androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:3) androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:1) androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:35) androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:44) androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:11) androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:4) androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:5) androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:11) androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:28) androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:5) androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:11) androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:1) androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke(NodeCoordinator.kt:2) androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke(NodeCoordinator.kt:1) androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:64) androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:46) androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:107) androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:2) androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:3) androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:1) androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:35) androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:44) androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:11) androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:4) androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:5) androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:37) androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:11) androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:28) androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:5) androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:52) android.view.View.draw(View.java:24737) android.view.View.updateDisplayListIfDirty(View.java:23520) android.view.View.draw(View.java:24424) android.view.ViewGroup.drawChild(ViewGroup.java:4684) android.view.ViewGroup.dispatchDraw(ViewGroup.java:4441) android.view.View.updateDisplayListIfDirty(View.java:23507) android.view.View.draw(View.java:24424) android.view.ViewGroup.drawChild(ViewGroup.java:4684) android.view.ViewGroup.dispatchDraw(ViewGroup.java:4441) android.view.View.updateDisplayListIfDirty(View.java:23507) android.view.View.draw(View.java:24424) android.view.ViewGroup.drawChild(ViewGroup.java:4684) android.view.ViewGroup.dispatchDraw(ViewGroup.java:4441) android.view.View.updateDisplayListIfDirty(View.java:23507) android.view.View.draw(View.java:24424) android.view.ViewGroup.drawChild(ViewGroup.java:4684) android.view.ViewGroup.dispatchDraw(ViewGroup.java:4441) android.view.View.updateDisplayListIfDirty(View.java:23507) android.view.View.draw(View.java:24424) android.view.ViewGroup.drawChild(ViewGroup.java:4684) android.view.ViewGroup.dispatchDraw(ViewGroup.java:4441) android.view.View.updateDisplayListIfDirty(View.java:23507) android.view.View.draw(View.java:24424) android.view.ViewGroup.drawChild(ViewGroup.java:4684) android.view.ViewGroup.dispatchDraw(ViewGroup.java:4441) android.view.View.draw(View.java:24737) com.android.internal.policy.DecorView.draw(DecorView.java:882) android.view.View.updateDisplayListIfDirty(View.java:23520) android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:736) android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:745) android.view.ThreadedRenderer.draw(ThreadedRenderer.java:851) android.view.ViewRootImpl.draw(ViewRootImpl.java:5667) android.view.ViewRootImpl.performDraw(ViewRootImpl.java:5329) android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4435) android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2992) android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10469) android.view.Choreographer$CallbackRecord.run(Choreographer.java:1671) android.view.Choreographer$CallbackRecord.run(Choreographer.java:1680) android.view.Choreographer.doCallbacks(Choreographer.java:1191) android.view.Choreographer.doFrame(Choreographer.java:1063) android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1650) android.os.Handler.handleCallback(Handler.java:958) android.os.Handler.dispatchMessage(Handler.java:99) android.os.Looper.loopOnce(Looper.java:222) android.os.Looper.loop(Looper.java:314) android.app.ActivityThread.main(ActivityThread.java:8670) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:565) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)

iLucasLiu commented 6 months ago

ME1715849146531 升级到2.0.1,对比之前的版本,仅修改了版本号,和上面的代码。

leavesCZY commented 6 months ago

你这个问题和这个很像:https://issuetracker.google.com/issues/290901622。我感觉可能是和 compose 版本或者 kotlin 版本不一致导致的,你可以尝试和 2.0.1 版本的先对齐后再试下