Proguard Android Studio

http://developer.android.com/tools/help/proguard.html

If make signed apk, open file build.gradle in the module folder.
Set minifyEnabled to true http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Running-ProGuard

 buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

Check if the file exists in the module folder proguard-rules.pro
c:\Users\meFolder\AndroidStudioProjects\MyProject\myModule\proguard-rules.pro

Android Studio Menu > View > Tool Window > Build Variant

Select the myModule and set debug to release

Android Studio Menu > Build > Generate Signed APK

This entry was posted in Android Studio and tagged . Bookmark the permalink.


Comments are closed.



1,714 views