I've upgraded my Xamarin Android project from SDK version 12.0 to 13.0. After that I'm getting below error on building the project in Release mode.
The following error occurs 50 times: R8 : Validation error : A type variable is not in scope. Furthermore, the build process fails with the following message: The process '/Library/Frameworks/Mono.framework/Versions/6_12_24/bin/msbuild' exited with code 1.
In the project's Manifest file, the relevant configuration is as follows:
<AndroidDexTool>d8</AndroidDexTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidLinkMode>Full</AndroidLinkMode>
This issue is coming from R8. If I remove R8, the app builds successfully. However, I am keen on utilizing R8 and would prefer not to proceed without it.
I would greatly appreciate any suggestions or guidance to resolve this issue.
Edit
Below is the Release configuration of my app:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>true</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<AotAssemblies>true</AotAssemblies>
<EnableLLVM>true</EnableLLVM>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<JavaMaximumHeapSize>2G</JavaMaximumHeapSize>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidPackageFormat>apk</AndroidPackageFormat>
<AndroidCreatePackagePerAbi>false</AndroidCreatePackagePerAbi>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<AndroidLinkMode>Full</AndroidLinkMode>