如何修复Okhttp和Samsung Spass SDK的警告?

时间:2019-07-29 14:27:55

标签: android warnings proguard

我正在使用okhttp和samsung spass sdk编写应用程序。当我使用proguard生成apk版本时,会收到警告。

Missing class: org.conscrypt.ConscryptHostnameVerifier
Missingclass:com.samsung.android.fingerprint.FingerprintManager$EnrollFinishListener
Missing class: com.samsung.android.fingerprint.FingerprintIdentifyDialog$FingerprintListener
Missing class: com.samsung.android.fingerprint.IFingerprintClient$Stub
Type `org.conscrypt.Conscrypt` was not found, it is required for default or static interface methods desugaring of `boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int)`
Type `org.conscrypt.ConscryptHostnameVerifier` was not found, it is required for default or static interface methods desugaring of `okhttp3.internal.platform.ConscryptPlatform$configureTrustManager$1`

经过一些研究,我添加了几行:

-dontnote com.samsung.**
-dontwarn com.samsung.**
-keep class com.samsung.** {*;}

-dontwarn org.conscrypt.**

两个警告消失了,但仍然有四个:

Type `org.conscrypt.Conscrypt` was not found, it is required for default or static interface methods desugaring of `boolean okhttp3.internal.platform.ConscryptPlatform$Companion.atLeastVersion(int, int, int)`
Type `org.conscrypt.ConscryptHostnameVerifier` was not found, it is required for default or static interface methods desugaring of `okhttp3.internal.platform.ConscryptPlatform$configureTrustManager$1`
Missingclass: com.samsung.android.fingerprint.FingerprintManager$EnrollFinishListener
Missing class: com.samsung.android.fingerprint.FingerprintIdentifyDialog$FingerprintListener

所以我没有尝试它没有帮助

我该如何解决?

我已经尝试过一些东西,例如

对于三星s,我什么也没发现。

对于okhttp:

-dontwarn javax.annotation.**
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
-dontwarn org.codehaus.mojo.animal_sniffer.*
-dontwarn okhttp3.internal.platform.ConscryptPlatform

它没有帮助。

1 个答案:

答案 0 :(得分:0)

<块引用>

在阅读信息消息时,它让我对此有所了解 Conscrypt 并进行了研究,发现我需要安装 加密到我的 gradle.app

implementation 'org.conscrypt:conscrypt-android:2.2.1'

它有效。