2017-08-26 87 views
0

我使用this庫我的移動應用程序,但是當我嘗試創建使用ProGuard簽署過的APK啓用(發佈配置),它給了我幾千錯誤這樣的:快速系列化的Android工作室gradle這個錯誤

Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.AttachingConnector 
Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.Connector$Argument 
Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.AttachingConnector 
Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.VirtualMachine 
Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.Bootstrap 
Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.VirtualMachineManager 
Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.connect.Connector 
Warning:javassist.util.HotSwapper: can't find referenced class com.sun.jdi.request.EventRequestManager 

我試過以下的ProGuard規則

-dontwarn com.** 
-dontwarn sun.** 
-dontwarn java.** 
-keep class com.** { *; } 
-keep class sun.** { *; } 
-keep class java.** { *; } 

但這只是導致我簽署APK永遠產生和永不完。我忘了配置什麼?

回答

0

我用下面的ProGuard規則

-dontwarn com.** 
-dontwarn sun.** 
-dontwarn java.** 
-keep class com.** { *; } 
-keep class sun.** { *; } 
-keep class java.** { *; } 
-keepclassmembers class sun.** { *; } 
-keepclassmembers class java.** { *; } 
-keepclassmembers class com.** { *; } 

雖然我不明白爲什麼我需要-keepclassmembers對於構建的gradle完成固定它。

相關問題