我想在发布apk后混淆项目的所有文件夹名称。
我已经看到许多相关的问题,但是没有一个起作用。我试过了,-flattenpackagehierarchy 'myobfuscated'
但是它创建了另一个myobfuscate文件,而不是重命名所有文件夹和类。我也用过-repackageclasses ''
但找不到解决方案。请帮我。
proguard.pro文件看起来像:-
-ignorewarnings -dontpreverify -allowaccessmodification -optimizations !code/simplification/arithmetic -keepattributes *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.view.View { public(android.content.Context); public (android.content.Context, android.util.AttributeSet); public (android.content.Context, android.util.AttributeSet, int); public void set*(...); } -keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet); } -keepclasseswithmembers class * { public (android.content.Context, android.util.AttributeSet, int); } -keepclassmembers class * implements android.os.Parcelable { static android.os.Parcelable$Creator CREATOR; } -keepclassmembers class **.R$* { public static ; } -keep public class * extends android.support.v4.app.Fragment -keep public class * extends android.app.Fragment -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 ; !private ; !private ; private void writeObject(java.io.ObjectOutputStream); private void readObject(java.io.ObjectInputStream); java.lang.Object writeReplace(); java.lang.Object readResolve(); } -assumenosideeffects class android.util.Log { public static *** e(...); public static *** w(...); public static *** wtf(...); public static *** d(...); public static *** v(...); } -keepclasseswithmembernames class * { native ; } -keepclassmembers class * { public void *onClick(android.view.View); } -keep class org.xmlpull.v1.** { *;} -dontwarn org.xmlpull.v1.** -keep public class * implements com.bumptech.glide.module.GlideModule -keep public class * extends com.bumptech.glide.module.AppGlideModule -keep public enum com.bumptech.glide.load.ImageHeaderParser$** { **[] $VALUES; public *; } -keepclassmembers class javax.xml.bind.DatatypeConverter { *; } -keepclasseswithmembers class DatatypeConverter { public static *; } -keep class javax.xml.** { *; } -keep interface javax.xml.** { *; } -keep class org.apache.xerces.** { *; } -keep interface org.apache.xerces.** { *; }