Skip to content

Facing issues when adding platform-specific DLLs (Android) to a .NET MAUI app and referencing them in the project file. #10674

@kalyan173106

Description

@kalyan173106

Android framework version

net9.0-android

Affected platform version

VS 2022

Description

Basically, I am building a .NET MAUI Android app using a Kotlin Multiplatform (KMM) SDK.

Step 1

I created a KMM sample SDK and generated the AAR for Android.

Step 2

Everything works fine when I follow the approach below for Android

I created:

an Android binding library

Android

For Android, I added the AAR to the Android binding project, generated the DLL, and referenced it in the MAUI Android app like this:

..\..\AndroidBindingNewSDK\AndroidBindingNewSDK\bin\Debug\net9.0-android\AndroidBindingNewSDK.dll

Problem Statement

Android

For Android, when I add both the DLL and the AAR directly to the MAUI app, I still encounter an issue:

libs\AndroidBindingNewSDK.dll false

Goal

My goal is to distribute only DLLs and make them work correctly for Android, without requiring the client to reference the original AAR file.

Steps to Reproduce

Step 1

I created a KMM sample SDK and generated the AAR for Android.

Step 2

Everything works fine when I follow the approach below for Android

I created:

an Android binding library

Android

For Android, I added the AAR to the Android binding project, generated the DLL, and referenced it in the MAUI Android app like this:

..\..\AndroidBindingNewSDK\AndroidBindingNewSDK\bin\Debug\net9.0-android\AndroidBindingNewSDK.dll

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-infoIssues that need more information from the author.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions