i am using Dexguard in my android application to protect from reverse engineering.Now in my application which is very big ,i have used several places System.out.println in many classes in which i am printing my server URL to debugg for my ease.Now when i am releasing this application ,and this apk i am giving to other developers ,they can see all the System.out.println things in their logcat. how should i avoid that. This has serious issue.
First of all you shouldn't be using
System.out.println
directly everywhere. Use your own wrapper class for logging.In dexguard/proguard you can use
assumenosideeffects
for removing codes that are unnecessary for release.So for
System.out.print
you can add following in your dexguard rules.But this is risky as this class might be used for purposes other than logging.
Fastest way for you would be to use
android.util.Log
in place ofSystem.out.print
and then add followingSee proguard docs