【发布时间】:2014-09-21 12:36:59
【问题描述】:
我正在尝试使用 Proguard 混淆我的 Android 应用程序。但是我遇到了一个奇怪的问题,希望你们中的一个能够帮助我。
-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
【问题讨论】:
标签: java android mysql jdbc proguard