Skip to content

Extraneous library artifacts included in archived Android APKs for incorrect platform (x64 in arm64 & vice versa) #10384

@williamlewis

Description

@williamlewis

Description

When we attempt an archive build for our .NET MAUI Android project, 3 apk packages are generated- one "fat" apk with both ARM64 and x64 architectures, and an architecture-specific apk for each platform.
The problem is that each architecture-specific apk seems to include library artifacts for the specific platform, EXCEPT for two files, which now appear for both architectures in ALL apk files: libassemblies.<arch>.blob.so and libarc.bin.so

Some research on these files yielded this blog post, which mentions:
With the release of .NET MAUI 9, a significant change was introduced in the way .NET libraries are packaged in Android applications. Instead of storing DLLs in separate files, all libraries are now embedded in ELF (.so) files named libassemblies..blob.so, where refers to the processor architecture, e.g., arm64-v8a.
https://mwalkowski.com/post/decompiling-an-android-application-written-in-net-maui-9-xamarin/

Question is- is this a build system bug? When we attempt to upload our individual architecture release apk files to the Play store, the second one is always rejected, as they see BOTH architectures already for the first file uploaded.

Image Image Image

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

9.0.70 SR7

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

.NET 8 (Please specify exact version)

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

We have been able to manually delete the extraneous architecture lib artifacts from each APK, before signing. After doing that, the architecture-specific APKs are accepted by G Play Console.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions