• xamarin android 报错 Could not load assembly 'Xamarin.Android.Support.v7.AppCompat


    严重性    代码    说明    项目    文件    行    禁止显示状态
    错误        Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
    文件名:“Xamarin.Android.Support.v7.AppCompat.dll”
       在 Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
       在 Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
       在 Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)    ToolbarFun            

    经对比发现应该是vs的bug,当创建了 Forms ContentView后就一直报这个错误,对比发现只要删除 .csproj 文件中的下面这段,即可以解决此问题:

    <Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
          <HintPath>..packagesXamarin.Forms.2.3.3.193libMonoAndroid10Xamarin.Forms.Core.dll</HintPath>
        </Reference>
        <Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
          <HintPath>..packagesXamarin.Forms.2.3.3.193libMonoAndroid10Xamarin.Forms.Platform.dll</HintPath>
        </Reference>
        <Reference Include="Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
          <HintPath>..packagesXamarin.Forms.2.3.3.193libMonoAndroid10Xamarin.Forms.Platform.Android.dll</HintPath>
        </Reference>
        <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
          <HintPath>..packagesXamarin.Forms.2.3.3.193libMonoAndroid10Xamarin.Forms.Xaml.dll</HintPath>
        </Reference>
  • 相关阅读:
    历经7年双11实战,阿里巴巴是如何定义云原生混部调度优先级及服务质量的?
    阿里园区的这个“格子间” 成为企业高效协同新利器
    神马是代码简单的cmd模式,这就是!
    什么是javascript的中间件?
    centos 修改主机名
    centos6.5 ssh免密码登陆
    mysql 镜像
    Spring Boot 负载均衡之外置session状态保存
    解决shiro和quartz2 版本冲突问题
    centos6.5 修改java环境变量
  • 原文地址:https://www.cnblogs.com/nanfei/p/8017132.html
Copyright © 2020-2023  润新知