克隆Xamarin.Forms中的仓库后的问题

时间:2018-12-11 16:15:51

标签: c# visual-studio firebase xamarin xamarin.forms

克隆回购后,我遇到了两个我从未见过的错误。

其中之一是“ ResolveLibraryProjectImports”任务失败。

Error		The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'AppName, Version=0.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'AppName.dll'
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
   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()	AppName.Android			

我尝试过:

清洁obj / bin文件夹 清理Nuget缓存 以管理员身份打开 将项目路径更改为较短的路径 更新Visual Studio 更新Xamarin库 更新Android SDK

我收到一条错误消息,说找不到FirebaseUser类型,但是在我的另一台PC上它可以正常工作,当然包括了库,因此即使包含了lib也找不到它,这很奇怪。

Error	CS0246	The type or namespace name 'FirebaseUser' could not be found (are you missing a using directive or an assembly reference?)	Appname C:\Projects\Appname \Appname \Appname \Services\IFirebaseAuthenticator.cs	15	Active

谢谢

1 个答案:

答案 0 :(得分:0)

由于不明确的原因(肯定与您的原因不同),我偶尔会收到此错误,并通过首先Rebuild特别是PCL项目,然后Rebuild设置特定于平台的错误来解决此错误项目。在解决方案级别进行重建无法解决问题。