Reputation: 10469
I got a simple question: from several sources I learned that using Proguard to remove calls to the Andriod logging framework using the optimization steps "assumenosideeffects" is a very clean and easy way.
I wanted to get rid of all my if's in my code related to if-logging-is-on.
But then:
But then: why on earth do I encounter all these "helpful" ideas to go the Proguard way of removing log calls? Has it been working in the past? Can I do anything to make it work? Because I really like the idea of cleaning my code, removing all the useless String constants only used for logging, etc.
Upvotes: 0
Views: 255
Reputation: 45648
ProGuard generally works fine, but it's always possible that you've run into a bug. You should check that you are using the latest version -- ProGuard 4.10 at this time of writing. You should see the version in the console log, or by typing
java -jar android-sdk/tools/proguard/lib/proguard.jar
The Android SDK often doesn't come with the latest version, but you can manually replace the jar with a recent copy from the ProGuard site. All versions are backward compatible.
Upvotes: 2