0
我想用Proguard來混淆我的Android應用程序。但是我遇到了一個奇怪的問題,我希望你們中的一個能夠幫助我。ProGuard Android - JDBC錯誤 - 空指針異常
-keep class android.support.v4.** { *; }
-keep public class com.mysql.** {*;}
-keep class com.actionbarsherlock.** {*;}
-dontwarn android.support.v4.**
-dontwarn com.mysql.**
-libraryjars /libs/mysql-connector-java-5.1.27-bin.jar
-dontshrink
-keepattributes *Annotation*
所以,你可以看到我已經添加了mysql JDBC庫作爲庫文件和類應該保留。但是,當我嘗試將該項目編譯爲.apk文件時,我終於遇到了這個奇怪的錯誤。根據我的配置,我不知道爲什麼它甚至不應該被觸及。
Proguard returned with error code 1. See console
Note: there were 508 duplicate class definitions.
You should check if you need to specify additional program jars.
Unexpected error while evaluating instruction:
Class = [com/mysql/jdbc/ConnectionImpl]
Method = [isReadOnly(Z)Z]
Instruction = [77] iload v4
Exception = [java.lang.NullPointerException] (null)
Unexpected error while performing partial evaluation:
Class = [com/mysql/jdbc/ConnectionImpl]
Method = [isReadOnly(Z)Z]
Exception = [java.lang.NullPointerException] (null)
Error: null