Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAUI app on Android can't load a native Android lib (.so) #9536

Closed
if-mindesk opened this issue Jul 24, 2024 · 4 comments
Closed

MAUI app on Android can't load a native Android lib (.so) #9536

if-mindesk opened this issue Jul 24, 2024 · 4 comments
Assignees
Labels
Area: App Runtime Issues in `libmonodroid.so`.

Comments

@if-mindesk
Copy link

Description

I built a sample MAUI app that needs to load Rhino CAD files using the nuget package Rhino3dm (https://www.nuget.org/packages/Rhino3dm/).
This package uses a native .so lib that the MAUI app on Android can't find (DllNotFoundException for 'librhino3dm_native').
I don't know if this issue is caused by MAUI, by the nuget package or something else
I also opened an issue for Rhino3dm mcneel/rhino3dm#633

Steps to Reproduce

Copy the file SampleFileRhino3dm/CubeTest200mm.3dm on the Android device
Start the app
Press the 'Pick Rhino 3dm file' button and select the provided file

Link to public reproduction project repository

https://github.com/if-mindesk/TestRhino3dm.git

Version with bug

8.0.70 SR7

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android

Did you find any workaround?

No

Relevant log output

No response

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Zhanglirong-Winnie
Copy link

This issue has been verified using Visual Studio 17.11.0 Preview 5.0(8.0.70). Can repro on Android device platform.

@blackmesacode
Copy link

whatever causes this issue, might also be the reason for this issue: libgit2/libgit2sharp.nativebinaries#158

basically also a System.DllNotFoundException potentially due to android maui not loading the native *.so library

@mattleibow mattleibow transferred this issue from dotnet/maui Nov 20, 2024
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Nov 20, 2024
@jpobst jpobst added Area: App Runtime Issues in `libmonodroid.so`. and removed needs-triage Issues that need to be assigned. labels Nov 21, 2024
@grendello
Copy link
Contributor

@if-mindesk I downloaded the latest nuget for Rhino and it doesn't contain Android shared libraries. There are libraries for desktop Linux (amd64 and arm64), but they won't work on Android. You will need a build that targets Android. Also, be aware that the library uses libc++ and on Android that means you have to package the libc++ library from the Android NDK, since Android doesn't ship a full C++ library on devices.

I am going to close this issue since there's nothing we can do on our end. However, should you continue to have any issues once the right nuget package is available, please reopen this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: App Runtime Issues in `libmonodroid.so`.
Projects
None yet
Development

No branches or pull requests

5 participants