Is it safe to ignore these proguard notes for kotlin?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-02 09:57:14

问题


I don't understand why I'm getting these notes from proguard and if I've to do anything to address them.

Note: kotlin.internal.PlatformImplementationsKt: can't find dynamically referenced class 
kotlin.internal.jdk8.JDK8PlatformImplementations 
Note: kotlin.internal.PlatformImplementationsKt: can't find dynamically referenced class 
kotlin.internal.JRE8PlatformImplementations 
Note: kotlin.internal.PlatformImplementationsKt: can't find dynamically referenced class 
kotlin.internal.JRE7PlatformImplementations 

Note: kotlin.jvm.internal.Reflection: can't find dynamically referenced class 
kotlin.reflect.jvm.internal.ReflectionFactoryImpl

Three of them are for kotlin.internal.PlatformImplementationKt and one for kotlin.jvm.internal.Reflection

My setup

kotlin: 1.2.71
Android Studio / gradle plugin: 3.2.0
gradle: 4.10.2

回答1:


Yes it is safe, you should add those rules to your proguard-rules.pro configuration

# Kotlin
-keep class kotlin.Metadata { *; }
-dontnote kotlin.internal.PlatformImplementationsKt
-dontnote kotlin.reflect.jvm.internal.**


来源:https://stackoverflow.com/questions/52689607/is-it-safe-to-ignore-these-proguard-notes-for-kotlin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!