“CheckDuplicateJavaLibraries”任务意外失败

时间:2016-04-19 07:57:29

标签: android visual-studio xamarin xamarin.android

我正在尝试构建我的应用,但会弹出以下错误。几天前,我对构建它没有任何问题。

Error       The "CheckDuplicateJavaLibraries" task failed unexpectedly.
System.IO.FileNotFoundException: Could not find file 'obj\Debug\__library_projects__\VectorCompat\library_project_imports\bin\classes.jar'.
File name: 'obj\Debug\__library_projects__\VectorCompat\library_project_imports\bin\classes.jar'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileInfo.get_Length()
at Xamarin.Android.Tasks.MonoAndroidHelper.SizeAndContentFileComparer.GetHashCode(FileInfo obj)
at System.Linq.Set`1.InternalGetHashCode(TElement value)
at System.Linq.Set`1.Find(TElement value, Boolean add)
at System.Linq.Enumerable.<DistinctIterator>d__63`1.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Xamarin.Android.Tasks.MonoAndroidHelper.DistinctFilesByContent(IEnumerable`1 filePaths)
at Xamarin.Android.Tasks.CheckDuplicateJavaLibraries.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()    TotemAndroid            

我应该删除VectorCompat组件并重新添加吗?为什么它在几天前建好时会突然出现这个错误?

提前致谢。

1 个答案:

答案 0 :(得分:3)

似乎有些文物未被复制到您的obj文件夹,即VectorCompat的{​​{1}}。我建议手动删除classes.jar文件夹并重建解决方案。