.NET for Android error XA1011
Example messages
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'.
Issue
The project is currently configured to use the D8 DEX compiler in combination with the ProGuard code shrinker. In the past, using the ProGuard code shrinker with the D8 DEX compiler was allowed, but now, only the R8 code shrinker is supported for use with the D8 DEX compiler.
Solution
Set the Code shrinker in the Visual Studio project properties pages to
r8, or edit the project file in Visual Studio or
another text editor and set the AndroidLinkTool
MSBuild property to r8
:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AndroidLinkTool>r8</AndroidLinkTool>
</PropertyGroup>
R8 might in some cases produce new build warnings or errors compared to ProGuard, so the ProGuard rules for the project might require a few updates to resolve any new warnings or errors that appear after this change.