I write -assumenosideeffects class android.util.Log
in my app. but how to use this.
-assumenosideeffects class android.util.Log
{
public static int d(...);
public static int v(...);
public static int i(...);
public static int e(...);
}
in proguard.cfg
file. but not working.
Android allows collecting system logs using Logcat. Log messages can be viewed in a Logcat window in Android Studio, or you can use the command line tool to pull them. Several Android apps are also available in the Google Play store that allow easy access to these tools.
View your app logs To display the log messages for an app: Build and run your app on a device. Click View > Tool Windows > Logcat (or click Logcat in the tool window bar).
To access the logging output, run the 'adb' executable with following arguments to capture the Android Enterprise related logging: Windows: C:\Users\[username]\AppData\Local\Android\sdk\platform-tools> adb logcat -G 32M; adb shell setprop persist. log.
The manual says -assumenosideffects
is "Only applicable when optimizing".
${sdk.dir}/tools/proguard/proguard-android.txt
says: "Optimization is turned off by default. Dex does not like code run through the ProGuard optimize and preverify steps".
http://researcharea.blogspot.com/2012/04/assumenosideeffects-not-working-in.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With