简体   繁体   English

Xamarin Forms无法使用MvvmCross(Android)构建

[英]Xamarin Forms won't build with MvvmCross (Android)

i have some trouble to build the android project with MvvmCross. 我在用MvvmCross构建android项目时遇到了一些麻烦。 Before i added MvvmCross the project build without problem. 在我添加MvvmCross之前,项目构建没有问题。 Note my windows phone project runs also without error. 请注意,我的Windows Phone项目运行也没有错误。

But after i added MvvmCross (3.2.2) i got this error: 但是在我添加MvvmCross(3.2.2)之后,出现了此错误:

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 'Cirrious.MvvmCross, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e16445fd9b451819'. Perhaps it doesn't exist in the Mono for Android profile?
Dateiname: "Cirrious.MvvmCross.dll"
   bei Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   bei Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   bei Xamarin.Android.Tasks.ResolveAssemblies.Execute() (smenso.SmartService.Mobile.Android)         

I' currently using: 我目前正在使用:

  • Xamarin Forms 1.2.3.6257 Xamarin表格1.2.3.6257
  • Xamarin Studio 5.5.4 Xamarin Studio 5.5.4
  • MvvmCross 3.2.2 MvvmCross 3.2.2

Thanks for help. 感谢帮助。

Thanks Stuart, 感谢Stuart,

after checking the differences of the solutions. 在检查解决方案的差异之后。 I noticed that my project is missing the MvvmCross.HotTuna.MvvmCrossLibraries . 我注意到我的项目缺少MvvmCross.HotTuna.MvvmCrossLibraries This package is necessary for the Android project to build (so it seems). 这个包对于Android项目的构建是必需的(看起来)。 Even if it's not a dependency. 即使它不是依赖项。

After adding this package via nuget, the Android project builds and works. 通过nuget添加此程序包后,Android项目便构建并运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM