Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use -assumenosideeffects class android.util.Log in my app

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.

like image 479
ARUNKUMAR Avatar asked Jun 20 '11 08:06

ARUNKUMAR


People also ask

How can I see the logs of an Android app?

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.

How can you access Android Logcat output?

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).

Where are Android logs stored?

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.


1 Answers

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

like image 178
Yevgen Kulik Avatar answered Sep 27 '22 18:09

Yevgen Kulik