当我的Android应用程序proguard,我的应用程序尝试连接到https服务器,连接被拒绝。我不知道为什么。所以我打包没有proguard的apk并做同样的测试,该应用程序运行正常,成功连接https服务器。这是我的proguard配置:
-optimizationpasses 5` `
-dontusemixedcaseclassnames ` `
-dontskipnonpubliclibraryclasses` `
-dontpreverifyenter` `
-verbose` `
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*` `
-ignorewarnings` `
-libraryjars libs/android-support-v4.jar` `
-libraryjars libs/universal-image-loader-1.9.3.jar` `
-libraryjars libs/libqblueota v0.96.jar` `
-libraryjars libs/zxing.jar` `
-keep class com.zxing.** {*; }` `
-keep class android.support.** {*;}` `
-keep class org.apache.** {*;}` `
-keep class com.nostra13.universalimageloader.** {*;}` `
-keep class com.google.zxing.** {*;}` `
-keep class android.** {*; }` `
-keep class com.sengled.cloud.service.** {*;}` `
-keep public class * extends android.app.Activity` `
-keep public class * extends android.app.Application` `
-keep public class * extends android.app.Service` `
-keep public class * extends android.content.BroadcastReceiver` `
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {native <methods>;}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}