When obfuscating an android app and having an aar that is already obfucated

When developing in android studio and obfuscating my app using proguard. when my dependencies include an aar that is already obfuscated. Will the code get obfuscated again? If not, what prevents it? I tried to find documentation for this and was unable to


Hi Guy,

Welcome to the Proguard Community! When obfuscating an android application that contains an aar that is already obfuscated Proguard will attempt to obfuscate the entire app and the aar once again. You must write a keep rule to preserve the entire aar

You can use a rule like the one below to preserve the aar:

-keep class my.library.package.** { *; }

Make sure to change the package name to correspond with your own package name. You can use the ProGuard Playground to confirm if this keep rule is effective.

Also you mention that your dependencies contain an aar. I just want to clarify do you have an sdk within an sdk (Fat AAR)?

Best Regards,


1 Like

Hi Aissa, thanks for your reply, it sounds like this is the case, and regarding your question, no, the sdk does not have an sdk within it

1 Like