我是Xamarin的新手,我试图把一切都做好。我已经安装了SDK的计算机上安装了Android Studio,还通过SDK管理器安装了Android SDK平台工具(我在某处读到了这个问题的解决方案,所以值得一提)。 SDK路径被赋予VS并且它有效。
每次我尝试创建Xamarin.Forms PCL项目时,都会收到相同的警告:
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. MyTunes.Droid 1 Active
Severity Code Description Project File Line Suppression State
Warning The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'MyTunes.Shared, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'MyTunes.Shared.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(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() MyTunes.Droid
如何解决这些警告?
答案 0 :(得分:1)
右键单击项目,您需要转到Nuget Package Manager。然后单击已安装的选项卡,然后单击全选复选框,然后全部更新。
然后重新构建