警告:跨平台Xamarin空白应用程序(Xamarin.Form便携式)

时间:2017-02-06 21:29:55

标签: xamarin xamarin.forms

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.   HelloWorld.Droid        1   Active


    Severity    Code    Description Project File    Line    Suppression State
Warning     The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'HelloWorld, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'HelloWorld.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() HelloWorld.Droid            

我遇到了与one相同的问题。但是没有解决方案。

我尝试更新xamarin,用xamarin重新安装visual studio,几乎安装了所有的android sdk和工具,但错误仍然存​​在。我甚至做了一个新的解决方案,但出现了同样的错误。

References

更新

根据dev_man提出的问题的建议,除了api 23及以上,我删除了所有api。之后尝试更新他提到的nuget包,但是从版本23.0到25.1.0。这失败了,我收到了这个错误:

     Severity   Code    Description Project File    Line    Suppression State
    ErrorCould not install package 'Xamarin.Android.Support.Design 25.1.0'. 
You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework.
 For more information, contact the package author.

1 个答案:

答案 0 :(得分:1)

有很多问题可能会导致这个问题浮出水面,遗憾的是核心问题在初期阶段似乎并不明显。 如果可以找到彻底解决的解决方案,那么之前的问题涵盖了广泛的可能原因。按照各个步骤操作时,您的错误可能会发生变化。 click here