Hi all, after enable the `minifyEnabled`, I encoun...
# android
l
Hi all, after enable the
minifyEnabled
, I encountered some error as:
Copy code
E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1
    Process: <http://com.org|com.org>.appname, PID: 17870
    java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter $this$collectionSizeOrDefault
        at kotlin.collections.CollectionsKt__IterablesKt.collectionSizeOrDefault(Unknown Source:2)
        at kotlin.collections.CollectionsKt.collectionSizeOrDefault(Unknown Source:0)
        at <http://com.org|com.org>.appname.c.a.c.a(:93)
        at <http://com.org|com.org>.appname.c.a.c$b.invokeSuspend(:41)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(:33)
        at kotlinx.coroutines.p0.run(:241)
        at kotlinx.coroutines.g2.a.a(:594)
        at kotlinx.coroutines.g2.a.a(:60)
        at kotlinx.coroutines.g2.a$b.run(:740)
Seems like something to do with proguard rules. I tried
Copy code
-keep class kotlinx.** { *; }
-keep class kotlin.** { *; }
But it didn't work. Any ideas?
i
You are trying to call null but it expects non null
l
I know. But it won't happen if I set minifyenabled to be false
i
what is your
Copy code
<http://com.org|com.org>.appname.c.a.c.a(:93)
l
I may need to use keepclassname for it. That is what I was testing now.
l
I used it as well
After I did
-keepnames
for "come.org.app.** {*;}, it magically solved the issue. Now I am curious about the reason.