示例消息
warning XA4232: The Android code generation target 'XamarinAndroid' is deprecated and will be removed in a future version of .NET for Android. Update the project properties to use 'XAJavaInterop1'.
问题
Android 代码生成目标 XamarinAndroid 已弃用。
解决方案
若要解决此警告,请将 Visual Studio 项目属性页中的 Android Codegen 目标 设置或 Visual Studio for Mac 中的 Code 生成目标 设置更新为 XAJavaInterop1。 这对应于 XAJavaInterop1 MSBuild 属性在 AndroidCodegenTarget 文件中的 值:
<PropertyGroup>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
</PropertyGroup>