简体   繁体   English

Xamarin System.IO.FileNotFoundException

[英]Xamarin System.IO.FileNotFoundException

I am trying to build a project and this error came up:我正在尝试构建一个项目,但出现了这个错误:

Severity    Code    Description Project File    Line    Suppression State
Error       System.IO.FileNotFoundException: Could not find file 'C:\Users\coded\.nuget\packages\xamarin.android.glide.disklrucache\4.12.0.4\buildTransitive\monoandroid10.0\..\..\jar\annotations.jar'.
File name: 'C:\Users\coded\.nuget\packages\xamarin.android.glide.disklrucache\4.12.0.4\buildTransitive\monoandroid10.0\..\..\jar\annotations.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__64`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.RunTask()
   at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17  WoWonder            

Please what should I do?请问我该怎么办?

I had the same problem when I was trying to install Glide 4.12.0.4, I uninstalled the Glide (from the same NuGet Manager Window), then I chose to install an older version of Glide like 4.12.0.0, and worked like charm!我在尝试安装 Glide 4.12.0.4 时遇到了同样的问题,我卸载了 Glide(从同一个 NuGet 管理器窗口),然后我选择安装像 4.12.0.0 这样的旧版本的 Glide,并且像魅力一样工作!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM