Setting ProGuard to obfuscate local variables and arguments

前端 未结 1 1549
慢半拍i
慢半拍i 2021-01-06 13:24

I can\'t seem to find the setting that will obfuscate the local variables, inside methods of a class which is obfuscated.

Here\'s an excerpt from one of the classes

相关标签:
1条回答
  • 2021-01-06 13:30

    You should remove or refine the option -keepattributes. It implies keeping attributes with local variable names:

    -keepattributes LocalVariableTable,LocalVariableTypeTable
    

    You could at least exclude those

    -keepattributes !LocalVariableTable,!LocalVariableTypeTable
    

    Ideally, you'd only preserve the attributes that are strictly required.

    See the ProGuard manual > Usage > -keepattributes

    0 讨论(0)
提交回复
热议问题