在Xamarin.Android中找不到“中央目录记录的结尾”

时间:2018-03-29 16:11:50

标签: android xamarin xamarin.android

我正在尝试将以下参考文件添加到我现有的项目中

 <package id="Xamarin.GooglePlayServices.Ads" version="60.1142.0" targetFramework="monoandroid80" />
  <package id="Xamarin.GooglePlayServices.Ads.Lite" version="60.1142.0" targetFramework="monoandroid80" />
  <package id="Xamarin.GooglePlayServices.Basement" version="60.1142.0" targetFramework="monoandroid80" />
  <package id="Xamarin.GooglePlayServices.Gass" version="60.1142.0" targetFramework="monoandroid80" />
  <package id="Xamarin.GooglePlayServices.Tasks" version="60.1142.0" targetFramework="monoandroid80" />

当我添加上述软件包并重建项目时,我得到了以下异常

Severity    Code    Description Project File    Line    Suppression State
Error       End of Central Directory record could not be found.
   at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
   at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
   at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
   at Xamarin.Build.Download.XamarinBuildAndroidAarRestore.LoadResource(String resourceFullPath, String assemblyName)
   at Xamarin.Build.Download.BaseXamarinBuildResourceRestore.MergeResources(IAssemblyResolver resolver, String originalAsmPath, String mergedAsmPath, String assemblyName, List`1 resourceItems)    iPro

当我删除上述参考时,它工作正常。如何解决这个问题。

0 个答案:

没有答案