devolay icon indicating copy to clipboard operation
devolay copied to clipboard

android cannot open the libdevolay-natives

Open gavin-dtl opened this issue 1 year ago • 3 comments

image

gavin-dtl avatar Aug 28 '24 02:08 gavin-dtl

You can even reproduce this with a very simple example application. It seems to me that the library is missing a link to the standard C++ library; the symbol _ZTISt12length_error likely corresponds to the std::length_error exception, which is part of libstdc++.

daubli avatar Oct 15 '24 12:10 daubli

What I've discovered so far:

If you add -lstdc++ to this line in the build script:

https://github.com/WalkerKnapp/devolay/blob/e62ab166ba644559f737c3e9959d18d21205fe2e/devolay-natives/build.gradle.kts#L79

and copy the libc++_shared.so file of the respective Android architecture (this file is included in the ndk) into the jni directory, you can get past this issue. I think you can then leave out the "-static-libstdc++" option, because with the option mentioned above we use dynamic linking instead of static linking.

However, I'm now encountering a different problem where I'm stuck. When calling Devolay.loadLibraries(), it eventually leads to this call:

https://github.com/WalkerKnapp/devolay/blob/e62ab166ba644559f737c3e9959d18d21205fe2e/devolay-java/src/main/java/me/walkerknapp/devolay/Devolay.java#L156

This call returns -1, which results in the error message: The NDI™ SDK libraries were not found.

The libndi.so file is definitely bundled in the APK, but for some reason, it seems that it cannot be loaded.

Does anyone have any ideas on how to resolve this?

daubli avatar Oct 24 '24 12:10 daubli

hey,

We are currently facing the same problem. Was anyone able to fix this issue ?

regards Julian

jnischler avatar Apr 09 '25 17:04 jnischler