--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFFAT%2BGqNicCMQv5HnB%2Bz%2B8gjYs%2B62FL5pWrKyEfzPtaJj19qQ%40mail.gmail.com.
That is not the path that APK shared libraries get installed on Android. Android tightly controls where things get installed, and does not allow applications to write files in system directories. Shared libraries are installed in an application-specific directory. In Java, do "application.getContext().getApplicationInfo().nativeLibraryDir" to find the name of the directory where native libraries get installed from the APK. This path contains a hash which changes each time the APK is installed, so it has to be read at runtime, and used for any dlopen calls you make.
On Sun, Dec 8, 2019 at 3:48 PM 'Gerry Fan' via android-ndk <andro...@googlegroups.com> wrote:
this is about this reported issue:--In which:1) app's libpybridge.so depends on libpython3.7m.so2) builds are fine with gradle and libpython3.7m.so is inside the APK3) at turn time it throws errors of:java.lang.UnsatisfiedLinkError: dlopen failed: library "/usr/local/google/home/gfan/proj/debug/hello-libs/app/src/main/cpp/../../../../distribution/conda-android-python/lib/arm64-v8a/libpython3.7m.so" not foundI do not know either why this goes to the host's directory to resolve the dependent libs? With readelf, it does archive that the path is to go host, not the apk's version:sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-readelf -d libpybridge.so
Dynamic section at offset 0x7b98 contains 29 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libandroid.so]
0x0000000000000001 (NEEDED) Shared library: [/usr/local/google/home/gfan/proj/debug/hello-libs/app/src/main/cpp/../../../../distribution/conda-android-python/lib/arm64-v8a/libpython3.7m.so]thank you for your answers in advanceGerry
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFFAT%2BGqNicCMQv5HnB%2Bz%2B8gjYs%2B62FL5pWrKyEfzPtaJj19qQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/711b4771-c729-4c72-8433-a7c06e8ba08d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/711b4771-c729-4c72-8433-a7c06e8ba08d%40googlegroups.com.