gpt4 book ai didi

proguard - proguard 只混淆变量名?

转载 作者:行者123 更新时间:2023-12-05 01:36:11 29 4
gpt4 key购买 nike

我想使用 ProGuard 重命名变量和函数。我希望生成的类文件在所有方面都与源 jar 相同,除了名称。有没有办法做到这一点?

我尝试使用 dontoptimizedontshrink 无效。

最佳答案

只需将以下内容放入您的 .pro 文件中,并确保您不使用“-keep”选项以防止其他内容被混淆。

# Don't keep the local variables attributes (LocalVariableTable and LocalVariableTypeTable are dropped).
-keepattributes Exceptions,Signature,Deprecated,SourceFile,SourceDir,LineNumberTable,Synthetic,EnclosingMethod,RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations,RuntimeVisibleParameterAnnotations,RuntimeInvisibleParameterAnnotations,AnnotationDefault,InnerClasses,*Annotation*

换句话说,请确保您的选项中没有以下内容

-keepattributes LocalVariableTable,LocalVariableTypeTable

关于proguard - proguard 只混淆变量名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14107741/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com