gpt4 book ai didi

c# - Xamarin 安卓 : Self-contradicting dependency requirements?

转载 作者:太空狗 更新时间:2023-10-29 14:58:07 28 4
gpt4 key购买 nike

尝试在 Xamarin Studio 中构建我的 Android 项目时,我不断收到如下错误:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): 
Error: Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'Mono.Android.Support.v4, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'.
Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Mono.Android.Support.v4.dll'
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
at Xamarin.Android.Tasks.ResolveAssemblies.Execute() (Akva20150407)

-

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): 
Error: Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken='.
Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Xamarin.Android.Support.v4.dll'
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
at Xamarin.Android.Tasks.ResolveAssemblies.Execute() (Akva20150407)

-

C:\progge\Apper\Akva20150407\Akva20150407\Act_MainGUI.cs(29,29): 
Error CS0433: The type 'Android.Support.V4.App.FragmentActivity' exists in both
'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\Mono.Android.Support.v4.dll' and
'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v5.0\Xamarin.Android.Support.v4.dll'
(CS0433) (Akva20150407)
  • 我必须将 Xamarin.Android.Support.v4 添加到 MonoAndroid 文件夹,否则它会提示找不到它。
  • 我必须将 Mono.Android.Support.v4 添加到 MonoAndroid 文件夹,否则它会提示找不到它。
  • 如果我同时添加两者,它会提示在两个包中都可以找到 FragmentActivity。
  • 这些包是通过 NuGet 安装的。

它看起来非常自相矛盾......我到底应该怎么做才能让它工作?

最佳答案

升级您的 Xamarin Studio

此错误已在 Xamarin Studio 中修复:5.7.0.436。查看错误报告:https://bugzilla.xamarin.com/show_bug.cgi?id=24276

关于c# - Xamarin 安卓 : Self-contradicting dependency requirements?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29533835/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com