You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running a .NET 8 Maui Application on Android 13 (API Level 33) with architecture arm64v8a
In my app i am utilising the nuget package "LibGit2Sharp 0.30.0" that has a transitive reference to "LibGit2Sharp.NativeBinaries 2.0.322".
Upon calling Repository.Init("path/to/my/repo") my app crashes:
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
---> System.DllNotFoundException: git2-a418d9d
at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
at LibGit2Sharp.Core.NativeMethods..cctor()
--- End of inner exception stack trace ---
at LibGit2Sharp.Core.Proxy.git_repository_init_ext(FilePath workdirPath, FilePath gitdirPath, Boolean isBare)
at LibGit2Sharp.Repository.Init(String path, Boolean isBare)
at LibGit2Sharp.Repository.Init(String path)
logcat output when executing the Repository.Init method:
[monodroid-assembly] Shared library 'git2-a418d9d' not loaded, p/invoke 'git_repository_init_ext' may fail
[monodroid-assembly] Shared library 'kernel32' not loaded, p/invoke 'LoadLibrary' may fail
[monodroid-assembly] Shared library 'libdl' not loaded, p/invoke 'dlopen' may fail
[monodroid-assembly] Shared library 'git2-a418d9d' not loaded, p/invoke 'git_libgit2_init' may fail
[monodroid-assembly] Shared library 'git2-a418d9d' not loaded, p/invoke 'git_openssl_set_locking' may fail
[monodroid-assembly] Shared library 'git2-a418d9d' not loaded, p/invoke 'git_libgit2_init' may fail
I checked the contents of my *.apk file and could correctly locate libgit2-a418d9d.so under lib/arm64-v8a
also the provided lib in the nuget seems to be of correct format/architecture:
$file libgit2-a418d9d.so
libgit2-a418d9d.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=91bb85cb63fc4326cd958916c059432d51053d31, not stripped
Am i missing something? How could I get more info about why the shared library 'git2-a418d9d' can not be loaded?
Any help appreciated :-)
The text was updated successfully, but these errors were encountered:
blackmesacode
changed the title
Failing to load shared library 'git2-a418d9d' on linux/arm64v8a
Failing to load shared library 'git2-a418d9d' on android/arm64v8a
Oct 1, 2024
I am running a .NET 8 Maui Application on Android 13 (API Level 33) with architecture arm64v8a
In my app i am utilising the nuget package "LibGit2Sharp 0.30.0" that has a transitive reference to "LibGit2Sharp.NativeBinaries 2.0.322".
Upon calling
Repository.Init("path/to/my/repo")
my app crashes:logcat output when executing the
Repository.Init
method:I checked the contents of my *.apk file and could correctly locate
libgit2-a418d9d.so
underlib/arm64-v8a
also the provided lib in the nuget seems to be of correct format/architecture:
dependencies of the lib:
Am i missing something? How could I get more info about why the shared library 'git2-a418d9d' can not be loaded?
Any help appreciated :-)
The text was updated successfully, but these errors were encountered: