0

My app working fine in debug mode, but in release mode, some string is not updating. for checking the issue, I tried to log that string. But release mode not giving me logs.

Bincy Baby
  • 3,941
  • 5
  • 36
  • 62

1 Answers1

1

You can solve this issue in several ways.

1) Just show string in a toast or a snackbar.

2) Turn off cutting logs from source code. Please check several ways how logs may be cut in your project: How to remove Log.d() calls in release build of an Android app? And then turn off cutting.

Ivan Shafran
  • 591
  • 2
  • 17
  • @BincyBaby From where did you try to show a toast? From service, regular class or something else? – Ivan Shafran Sep 22 '17 at 11:41
  • regular class, toasts showing up in debug mode. But in release mode its not working – Bincy Baby Sep 22 '17 at 11:42
  • @BincyBaby "Since JellyBean (API Level 16), android.widget.Toast will not show when check off "Show Notification" on app info settings." May be this is the problem here. But I'm not sure. – Ivan Shafran Sep 22 '17 at 11:46
  • @BincyBaby Ok. Let's try second way. If you are using standard Log class just try turn off proguard in release. Firstly, you will be able to check if proguard leads to string weird behavior. Secondly, you will be able to see logs in logcat. – Ivan Shafran Sep 22 '17 at 11:55