Building Library\Bee\artifacts\Android\iz17e\libil2cpp.so failed with output. Need help to resolve

So I’m trying to build this app into my device which uses Location based AR with ARCore and Map Tiles api. I’m using Cesium to load the map tiles and i keep getting this error. Any clue what could be the issue?
This is the error i get:

Building Library\Bee\artifacts\Android\iz17e\libil2cpp.so failed with output:
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘adler32.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘adler32_fold.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘chunkset.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘compare256.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘compress.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘cpu_features.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘crc32_braid.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘crc32_braid_comb.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘crc32_fold.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate_fast.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate_huff.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate_medium.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate_quick.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate_rle.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate_slow.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘deflate_stored.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘functable.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘infback.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: Library/PackageCache/com.cesium.unity@1E9B554155ED/Plugins/iOS/lib/libz-ng.a: archive member ‘inflate.c.o’ is neither ET_REL nor LLVM bitcode
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

UnityEditor.EditorApplication:Internal_CallDelayFunctions ()

I put this up on Unity forums and one of the staff replied with this:

#From Thomas1856 (staff at Unity)

It looks like com.cesium.unity has a static library named libz-ng.a, since it’s in iOS folder, it should be only used for iOS, yet it’s being picked up by Android build pipeline.

Basically com.cesium.unity needs to fix plugin importer settings for that library, and make it compatible only with iOS platform.

Hope this issue is getting resolved or is resolved :D.

Let me know if there’s any other file which needs to be attached.

Hi @DanAtCesiumion, welcome to the community!

Well, the Unity engineer’s explanation makes sense… except that the Unity documentation says the Plugins/iOS directory should be treated specially as being iOS-specific:

We are indeed relying on this behavior (we are not explicitly setting the platform), and it seems to be working correctly in other contexts.

So I’m not sure why the Android build is picking it up in this case. This seems like a Unity bug to me. We can work around it, of course, by generating the appropriate meta files. Can you tell me what version of Cesium for Unity and Unity itself you are using?