The answer is in the error message:
Please set the code shrinker to r8
When using the d8 dex compiler you need to use the r8 linker. This is the correct method for ensuring smaller apps. Dex & Proguard is an old, less capable method.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am following the steps to prepare for publishing my app found here
https://learn.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/proguard
I am at the shrink the APK step and it suggests using proguard. I went to this document for instructions:
https://learn.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/proguard
When I compile with the dex compiler setting, I get the following:
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(556,2): error XA1011: Using ProGuard with the D8 DEX compiler is no longer supported. Please set the code shrinker to r8 in the Visual Studio project property pages or edit the project file in a text editor and set the AndroidLinkTool MSBuild property to r8.
==========
Rebuild All: 1 succeeded, 1 failed, 1 skipped ==========
If I set the dex compiler to dx, I get the following:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(560,2): warning XA1023: Using the DX DEX Compiler is deprecated. Please update $(AndroidDexTool) to d8.
My question(s): Is proguard not the way to go these days and the docs are out of date?
re: What is the actual CURRENT guidance for this?
The answer is in the error message:
Please set the code shrinker to r8
When using the d8 dex compiler you need to use the r8 linker. This is the correct method for ensuring smaller apps. Dex & Proguard is an old, less capable method.