kezong / fat-aar-android

A gradle plugin that merge dependencies into the final aar file works with AGP 3.+
MIT License
3.08k stars 607 forks source link

用fataar生成混淆的aar包的时候,kotlin的lazy函数报错 #380

Open gi13371 opened 2 years ago

gi13371 commented 2 years ago

Describe the issue 用fataar生成混淆的aar包的时候,kotlin的lazy函数报错,我看了反编译后的java代码,混淆后引入的lazyKT变成了LazyKt__LazyJVMKt,然后报这个错误: java.lang.IllegalAccessError:Illegal class access('com.xxx.xxx.xxx 'attempting to access 'kotlin.LazyKt_lazyJVMKT') in attempt to invoke static method kotlin.Lazy kotlin.LazyKt_LazyJVMKT.lazy(kotlin.jvm.functions.Function0)....

一开始我不知道是fataar打包导致的,我试着去掉embed标签依赖,打出来的混淆包就没有问题(一样的混淆规则)。 希望大佬快点解决这个问题,谢谢。

Build Environment