我可以在 4.1.2 (api 16) 和 4.2.2 (api 17) 上调试和运行我的应用程序。如果我在构建设置为 17 时尝试导出应用程序进行生产,它会正常工作,但如果我将目标降低到 17,我会遇到一些错误,主要错误是
警告:com.google.android.gms.common.images.a:在类 android.widget.TextView 中找不到引用的方法 'android.graphics.drawable.Drawable[] getCompoundDrawablesRelative()'
不知道为什么它会抛出该错误或为什么它适用于一个 api 级别而不适用于另一个?
这是我的 proguard 配置文件
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keepattributes Signature
-keepattributes *Annotation*
-dontobfuscate
-keepclassmembers public class org.springframework {
public *;
}
-dontwarn com.amazonaws.**
-dontwarn com.fasterxml.**
-dontwarn org.springframework.**
-dontwarn com.emilsjolander.**
-keep class com.amazonaws.** { *; }
-keep class org.springframework.** { *; }
-keep class com.fasterxml.** { *; }
-keep class com.facebook.** { *; }
-keep class com.emilsjolander.** { *; }
-keepnames class * implements java.io.Serializable
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}