What is minifyEnabled in Android

Remove Android Log Messages


Test your video apps using the standard log messages to aid in debugging. When you're ready to publish your app, you can remove these log messages.

Remove log messages

To remove the standard log messages from the Native SDK for Android, do the following:

  1. Open the file in your app proguard-rules.pro .
    In Android Studio, this file is created by default. If you're wondering where this file is in our Brightcove Android samples, we have this file in proguard-project.txtrenamed.
  2. Add the following block of code to remove the log from your app: For details on log messages, see the Android Log class documentation.
  3. Next, open the build.gradle file Your app.
  4. In this section, add the attribute with the value of.
  5. Under the previous code, add an attribute like this:
    • Use the method to get the file proguard-android-optimize.txt from the Android SDK.
    • Reference the file proguard-rules.pro .

    Your build.gradle file should look something like this:
Android Studio temporarily disables the Java Code Coverage Library (JacoCo) and ProGuard while Instant Run is in use. Since Instant Run only works with debug builds, it will not affect your release build (https://developer.android.com/studio/run/index.html).

If you want to remove logs for your debug build type, you need to disable Instant Run.