IntelliJ / Android Studio - how to activate proguard to obfuscate code - step by step?

I searched everywhere for an answer, but could not find.

The main problem is that eveyone is talking about the proguard configuration file, but it is not there, IntelliJ / Android Studio does not create such a file, there is not one in the SDK, so how do I create the correct configuration file for obfuscation proguard?

+4
source share
3 answers

I know that I was a little late with the answer, but here is the answer This blog contains everything you need from scratch, step by step with images.

  • In android Studio, open a project in the Project view
  • Open the build.gradle file for the application.
  • Change

minifyEnable false

minifyEnable true

. , .

+7

android-sdk\tools\proguard\proguard-android.txt proguard-android-optimize.txt. , SDK Manager "Android SDK Tools". , IntelliJ proguard-project.txt . , , . .

" ProGuard APK" " " (F4):

enter image description here

0

Andoird Studio proguard-rules.pro . :

  • Change the view to Project instead of Android :

change view

  • Now that you have done this, you can view the file proguard-rules.proinside yourproject / app / proguard-rules.pro . (see screenshot)

See screenshot

The rest of the proguard configuration is traditional, and you can find a lot of information by sending it to Google. :)Hope this helps.

0
source

All Articles