Proguard 활성화

Column
코드 축소를 활성화하여 릴리스 빌드에 ProGuard를 실행합니다. 축소를 활성화하면 미사용 코드가 APK에 전달되지 않습니다. 이 기법을 사용하면 multidex를 활성화할 필요가 없을 뿐만 아니라 APK의 전체 크기를 줄일 수 있습니다.
Tags
Play Store
build
protect
config
 

Enabling Proguard to reduce the size of the APK (optional)#

Proguard is a tool that can slightly reduce the size of the APK. It does this by stripping parts of the React Native Java bytecode (and its dependencies) that your app is not using.
IMPORTANT: Make sure to thoroughly test your app if you've enabled Proguard. Proguard often requires configuration specific to each native library you're using. See app/proguard-rules.pro.
 
android/app/build.gradle
  • 기본적으로 false로 되어있는데 이걸 true로 수정.
/** * Run Proguard to shrink the Java bytecode in release builds. */ def enableProguardInReleaseBuilds = true
notion image