发布步骤使用Visual Studio 2019编译Android APK

VV *_*oon 5 release compilation apk xamarin

我已经使用Visual Studio 2019完成了我的第一个应用程序-跨平台Xamarin C#。该应用程序运行良好。现在,我想将其编译为apk文件,以便可以将其手动安装到手机上。我确实将调试更改为发布,然后从android文件中右键单击并选择“存档”。但是,出现以下错误:

The preprocessor token 'rootnamespace' has been given more than one value. Choosing 'Calculator.Droid' as the value.
The preprocessor token 'assemblyname' has been given more than one value. Choosing 'Calculator.Android' as the value.
The preprocessor token 'fullpath' has been given more than one value. Choosing 'D:\Calculator\Calculator\Calculator.Android' as the value.
The preprocessor token 'outputfilename' has been given more than one value. Choosing 'Calculator.Android.dll' as the value.
The preprocessor token 'filename' has been given more than one value. Choosing 'Calculator.Android.csproj' as the value.
MSB4094: "obj\Release\81\Calculator.Android.dll;obj\Release\81\Calculator.Android.dll" is an invalid value for the "OutputAssembly" parameter of the "Csc" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".
Run Code Online (Sandbox Code Playgroud)

Ell*_*rks 1

我遇到了同样的错误,只需在项目属性中设置应用程序图标即可解决它。

考虑到错误,这没有多大意义,但它对我有用。希望这对某人有帮助。