Xamarin.Android.Support.Fragment,Version = 1.0.0.0,Culture = neutral,PublicKeyToken =’.也许它在Mono for Android配置文件中不存在?

前端之家收集整理的这篇文章主要介绍了Xamarin.Android.Support.Fragment,Version = 1.0.0.0,Culture = neutral,PublicKeyToken =’.也许它在Mono for Android配置文件中不存在?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图使用Xamarin. Android.Support库版本25.3.1,但由于一个错误,我决定降级回我以前的版本23.3.0.降级后,我收到以下错误消息.无论我尝试什么,我都无法摆脱它.我试图删除所有bin,obj,tmp等文件夹.重启VS2015,清理,重建……
Severity    Code    Description Project File    Line    Suppression State
    Error       Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 
'Xamarin.Android.Support.Fragment,Version=1.0.0.0,Culture=neutral,PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
    File name: 'Xamarin.Android.Support.Fragment.dll'
       at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference,ReaderParameters parameters)
       at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver,ICollection`1 assemblies,AssemblyDefinition assembly,Boolean topLevel)
       at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)

我在package.config文件中发现了一个小小的变化.以下都是
targetFramework =“monoandroid71”现在.在升级降级之前,他们是targetFramework =“monoandroid70”,我将它们替换为manulla但是,它根本没有帮助.我该如何解决这个问题?

<package id="Xamarin.Android.ShortcutBadger" version="1.1.809" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.CustomTabs" version="23.3.0" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.v7.CardView" version="23.3.0" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" targetFramework="monoandroid71" />
  <package id="Xamarin.Android.Support.v7.Palette" version="23.3.0" targetFramework="monoandroid71" />

我的设置如何

参考文献:

更新:
我已经重新安装了所有nugetpackages并成功运行1个pc上的android项目,但有趣的是同一个项目没有在另一台PC上运行.它返回不同但相似的错误.

Severity    Code    Description Project File    Line    Suppression State
Error       The "ResolveLibraryProjectImports" task Failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'myApp,Version=0.0.0.0,PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'myApp.dll'
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference,ReaderParameters parameters)
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName,ReaderParameters parameters)
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.GetAssembly(String fileName)
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res,ICollection`1 jars,ICollection`1 resolvedResourceDirectories,ICollection`1 resolvedAssetDirectories,ICollection`1 resolvedEnvironments)
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() myApp.Droid

解决方法

我的问题是我更新了xamarin表格到2.5.0.121934,
然后,它显示错误“加载程序集时出现异常:System.IO.FileNotFoundException:无法加载程序集
‘Xamarin.Android.Support.Fragment,Version = 1.0.0.0,Culture = neutral,
公钥=”.也许它在Mono for Android个人资料中不存在?“

所以我将我的xamarin.form降级到2.3.4.247,然后它成功构建.

原文链接:https://www.f2er.com/android/316372.html

猜你在找的Android相关文章