Skip to content Skip to sidebar Skip to footer

How To Obfuscated Jar Or AAR Files

Can someone help me about, obfuscated or give me example to do this? I created an .aar file and .jar file and put the class of getter and setter that will give value if they acces

Solution 1:

You can move your private classes/interfaces to other packages, e.g. put your privateClass to an internal package package com.example.your.library.internal; to distinguish with your public classes/interfaces.


package com.example.your.library.internal;

public class privateClass {
    String getStringExample()
    {
        return "TEST RESULT";
    }
}

And add below line to your proguard configuration

-keep public class com.example.your.library.* { public *; }

Note that you should use single wild char * to NOT obfuscate the internal packages.


Post a Comment for "How To Obfuscated Jar Or AAR Files"