기본 콘텐츠로 건너뛰기

Android Studio ProGuard and remove Log

If to remove Log.x for release, set ProGuard in build.gradle as follow

proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'


and add those to proguard-rules.pro

  -assumenosideeffects class android.util.Log {
      public static *** d(...);
      ..
  }

Be careful, assumenosideeffects  make effect at optimization level, so you should use proguard-android-optimize.txt instead proguard-android.txt

댓글

이 블로그의 인기 게시물