Xamarin Android 构建失败“outputAssembly 的值无效" [英] Xamarin Android Build Failed "Invalid value for outputAssembly"

查看:15
本文介绍了Xamarin Android 构建失败“outputAssembly 的值无效"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前我的解决方案似乎工作正常,但今天突然间 Android 项目无法构建.我没有收到错误,但我确实得到了以下输出:

A few days ago my solution seemed to work fine, but today all of the sudden the Android project doesn't build. I get no Error, but I do get the following output:

1>Build started.
1>Project "MyApp.Android.csproj" (Install target(s)):
1>Project "MyApp.csproj" (GetTargetFrameworks target(s)):
1>Done building project "MyApp.csproj".
1>Project "MyApp.csproj" (GetTargetFrameworks target(s)):
1>Done building project "MyApp.csproj".
1>Project "MyApp.csproj" (GetTargetPath target(s)):
1>Done building project "MyApp.csproj".
1>Project "MyApp.csproj" (GetTargetPath target(s)):
1>Done building project "MyApp.csproj".
1>Project "MyApp.csproj" (GetNativeManifest target(s)):
1>Done building project "MyApp.csproj".
1>Project "MyApp.csproj" (GetNativeManifest target(s)):
1>Done building project "MyApp.csproj".
1>"objDebugMyApp.Android.dll;objDebugMyApp.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".
1>Done building project "MyApp.Android.csproj" -- FAILED.
1>Build FAILED.

我还尝试删除 bin en obj 文件夹,清理并重建解决方案并删除 MyApp.Android.dll.但在重建之后,完全相同的事情再次发生.

I also tried to delete the bin en obj folders, clean and rebuild the Solution and deleting the MyApp.Android.dll. But after the Rebuild the exact same thing happens again.

我确实收到以下警告:

Severity    Code    Description Project File    Line    Suppression State
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled.   BarApp.Android      1   Active

推荐答案

你必须设置你的项目 Linking to Sdk Assemblies Only 并将支持架构设置为 armeabi - v7x86.

You have to set your Project Linking to Sdk Assemblies Only and set support architecture to armeabi - v7 and x86.

在尝试cleanrebuild项目之后

它的作用就像魅力一样.

It work like charm.

这篇关于Xamarin Android 构建失败“outputAssembly 的值无效"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆