Примечание.
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
Примеры сообщений
warning XA1027: The 'EnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'.
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'.
Проблема
The project is currently configured to use the D8 DEX compiler and has the older EnableProguard MSBuild property set to true without any value set for the newer AndroidLinkTool MSBuild property. This results in an XA1011 error because the ProGuard code shrinker is no longer compatible with the D8 DEX compiler.
Решение
Edit the project file in Visual Studio or another text editor and remove all of the old
<EnableProguard>elements.After saving the project file, open it in Visual Studio as usual and set the Code shrinker in the Visual Studio project properties pages to r8, or continue editing the project file in the text editor and set the
AndroidLinkToolMSBuild property tor8:<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <AndroidLinkTool>r8</AndroidLinkTool> </PropertyGroup>
В некоторых случаях R8 может создавать новые предупреждения сборки или ошибки по сравнению с ProGuard, поэтому правила ProGuard для проекта могут потребовать нескольких обновлений для устранения новых предупреждений или ошибок, которые появляются после этого изменения.