I am enabling proguard in my application. Whenever I am building my application I am getting following error.
Constructor not matched for class com.acs.nomad.d.b.e
As Per my mapping file the class this is referring to is as below
package com.my.package;
import java.util.ArrayList;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Root;
@Root (name = "folders")
public class Folders
{
@ElementList (entry = "contactFolder", required = false, inline = true)
private ArrayList<ContactFolder> contactFolder;
/**
* List of contact folders
*/
public ArrayList<ContactFolder> getContactFolder()
{
return contactFolder;
}
}
I have tried all option as per these url proguard-obfuscation-is-breaking
proguard-android-and-abstract-class-instantiation
android-proguard-and-keepclasseswithmembernames
Nothing seems to work. My Proguard.config file is
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keepattributes Signature, *Annotation*
-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 *;
}
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
!private <fields>;
!private <methods>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
-keep public class org.simpleframework.**{ *; }
-keep class org.simpleframework.xml.**{ *; }
-keep class org.simpleframework.xml.core.**{ *; }
-keep class org.simpleframework.xml.util.**{ *; }
#Added commands
-assumenosideeffects class android.util.Log {
public static int d(...);
public static int v(...);
}
-keep class net.sqlcipher.** {
*;
}
#dont warn for the android support version
-dontwarn android.support.**
# dont warn for google or framework related warning
-dontwarn com.google.**
-dontwarn org.simpleframework.**
#-dontshrink
-keepattributes ElementList, Root
-keepclassmembers class * {
@org.simpleframework.xml.* *;
}
If you notice -dontshrink
command is commented out. I want to shrink the apk so I don't want to run that command. Please also note that I am uncommenting -dontshrink
command, it works.
Can anybody tell whats wrong?