I'm using DexGuard Enterprise for my apps. And I find that whenever I use a library that have ENUM in it (for eg: ZXing), DexGuard did something to the code that my app would crash with errors like
java.lang.AssertionError: impossible
at java.lang.Enum$1.create(Enum.java:49)
at java.lang.Enum$1.create(Enum.java:35)
at libcore.util.BasicLruCache.get(BasicLruCache.java:54)
at java.lang.Enum.getSharedConstants(Enum.java:211)
at java.lang.Enum.valueOf(Enum.java:191)
at com.google.zxing.BarcodeFormat.valueOf(:24)
I tried options such as these (as I found them on other questions), but not working
-keep enum com.google.zxing.** {
*;
}
what seems to be the problem? How could I fix it? It's bugging me for weeks now.
Try to add the following in your proguard file.