Search code examples
androidxamarinxamarin.formsxamarin.androidproguard

Xamarin Forms Android - How to Enable Proguard Shrinker in Visual Studio for Mac 2019


I am trying to invoke Proguard Code Shrinker for my XF 5.x Android Application in Visual studio for Mac 2019.

It looks like I need the Windows version from the Documentation. Is that true?

https://learn.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/proguard?tabs=macos


Solution

  • I haven't tested it, but the equivalent place to find the option on Mac is:

    rt-click on your Android project / Options / Build / Android Build / Code Shrinker.

    There you'll see choices

    • proguard
    • r8

    Apparently r8 is the recommended choice - click the (i) icon next to Code Shrinker dropdown for an explanation.