Reflection - RetroGuard Documentation
Use of reflection may cause your code to behave incorrectly after obfuscation. No obfuscator can automatically solve this problem without storing the entire name mapping table in your Jar archive, because the class, method, or field name can be constructed or changed in a way that is only known at run-time. In the case of To switch on automatic
.option MapClassString
If any of the following method calls are detected during obfuscation, a warning is posted to the log file.
When these warnings are found in the obfuscation log, you should examine your source code to determine if the introspection methods act only on classes, methods and fields outside of the JAR. If so, they will cause no problems. If the methods can refer to classes, methods or fields within your Jar file, run-time problems can arise because these identifiers may have been obfuscated. In that case, the solution is to reserve these identifiers using the script file, so that obfuscation does not change them. [RetroGuard-v2.2.x only]
In either case, once you have dealt with introspection warnings from a class, you may choose to suppress the warnings in future runs using the script line:
.nowarn com/pk/MyClass
|
|