Card.io lines do not change with proguard

I have a problem with obfuscation on card.io.

I change the lines to strings.xml with the tags specified on the official card.io page, and while I am debugging, the application uses the changed lines. But when I export a signed apk with proguard, the application uses its own strings. Could you help me? What am I missing?

This is my proguard.cfg content: (I am using a sample progard file.)

-optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -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 -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 *; } -keep class io.card.** -keepclassmembers class io.card.** { *; } ## Good practice so that you don't end up logging sensitive info. # Remove debug, verbose, and info Log calls -assumenosideeffects class android.util.Log { public static *** d(...); public static *** v(...); public static *** i(...); ## Uncomment to remove warnings and errors as well # public static *** w(...); # public static *** e(...); } 
+4
source share
2 answers

Jeff from card.io is here.

card.io no longer supports the strings.xml file from version 3.1.0+, because the SDK provides translations. Are you using the latest version?

If not, download the latest SDK . You can either rely on the device language settings to automatically detect the correct localizations, or force the language to be used with CardIOActivity.EXTRA_LANGUAGE_OR_LOCALE (see javadocs ).

+3
source

To add an answer to Jeff, if there is a problem with the translation, we would like to fix it! Please error files here .

I also updated the sample application to remove the sample strings. Thank you for letting us know that it is out of date.

0
source

Source: https://habr.com/ru/post/1501702/


All Articles