我正在尝试构建我的应用程序,但弹出以下错误。几天前,我在建造它方面没有问题。

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组件并再次添加它吗?为什么几天前建好的时候突然出现了这个错误?
提前谢谢。

最佳答案

似乎有些艺术品没有被复制到您的obj文件夹,即VectorCompatclasses.jar。我建议手动删除obj文件夹并重新生成解决方案。

08-18 06:15