xamarin / GooglePlayServicesComponents

Other
315 stars 148 forks source link

Build fails when having a reference to Xamarin.Firebase.Messaging v121.0.1 on M1 Mac #459

Open andcoman opened 3 years ago

andcoman commented 3 years ago

Xamarin.Android Version (eg: 6.0):

Version: 11.2.2.1

Operating System & Version (eg: Mac OSX 10.11):

macOS Big Sur 11.1

Google Play Services Version

Xamarin.Firebase.Messaging v121.0.1

Describe your Issue

Hello,

I have some problems with Xamarin.Firebase.Messaging v121.0.1 on the Apple M1. Having this package installed causes the build to fail. Please note: if I downgrade one version, to 121.0.0, everything it's fine. This issue seems to be reproducible just on the M1 Mac, if I use an Intel based one I compile without problems.

The error message:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error XADJL7024: Xamarin.Tools.Zip.ZipIOException: File obj/Debug/lp/107/jl/classes.jar is not a ZIP archive
  at Xamarin.Tools.Zip.ZipArchive.Open (System.String path, System.IO.FileMode mode, System.String defaultExtractionDir, System.Boolean strictConsistencyChecks, Xamarin.Tools.Zip.IPlatformOptions options) [0x00142] in /Users/runner/work/1/s/ZipArchive.cs:274 
  at Xamarin.Android.Tools.Files.ReadZipFile (System.String filename, System.Boolean strictConsistencyChecks) [0x00000] in <5a1df33220564ef787578ac3c7e67d03>:0 
  at Xamarin.Android.Tools.Files.ZipAny (System.String filename, System.Func`2[T,TResult] filter) [0x00000] in <5a1df33220564ef787578ac3c7e67d03>:0 
  at Xamarin.Android.Tasks.DetermineJavaLibrariesToCompile.HasClassFiles (System.String jar) [0x00000] in <5a1df33220564ef787578ac3c7e67d03>:0 
  at Xamarin.Android.Tasks.DetermineJavaLibrariesToCompile.RunTask () [0x00128] in <5a1df33220564ef787578ac3c7e67d03>:0 
  at Xamarin.Android.Tasks.AndroidTask.Execute () [0x00000] in <5a1df33220564ef787578ac3c7e67d03>:0  (XADJL7024) (Foo)

For more information please check the attached files

BuildIssue.zip .

Thank you, Andrei

moljac commented 3 years ago

Thanks for the feedback. Will check the repro sample ASAP.