Reputation: 157
I am trying to make Dexguard not stripping out logging functions when it is shrinking and obfuscating my code. I have therefore commented the following instruction in Dexguard configuration file:
-assumenosideeffects class android.util.Log {...}
Once this instruction is commented, build fails with the following error message :
Execution failed for task ':app:dexguardRelease'. > Instruction has invalid constant index size ([699742] ldc_w #65536)
I have first thought that the problem was related to Android 64K limits but the build successes when dexguard is disabled or when it is enabled and set to strip out the logging functions.
Is it possible that dexguard has troubles obfuscating functions like Log.d() that can contain long strings as input arguments?
Thanks
Upvotes: 0
Views: 680
Reputation: 6200
You probably have lots of debug strings in this class in combination with an -encryptstrings **
directive.
This will lead to a large number of encrypted strings in a single class leading to errors as described in your post.
I would suggest that you revisit your -encryptstrings
rules, and only encrypt the ones that are really sensitive.
Upvotes: 1