Attempted to create libXXXXX.so by cross-compiling the third-party code for Android.The app is Android Studio and the build was successful, but when running the app, the following error occurs:
logcat error log
so.0 on libXXXXX.so is somehow the cause, but I don't know what to do with Android Studio.
The readelf command is as follows:
CMakeLists.txt is as follows
The Java code is as follows:
·Even if I put libXXXXX.so.0 in the same location as the so file, the error remained.
·I also tried libXXXXXX.a (STATIC LIBRARY) and it was successfully executed.
I thought I might add SONAME-related options to CMakeLists.txt, but I didn't really understand.I look forward to working with you on the solution.
The situation has changed.
Failed to loadLibrary
New logcat error log
Regarding the error without acos, is there no acos on Android?Is it difficult to solve this problem?Thank you for your cooperation.
I tried to change the following, but the situation did not change (remain the same error)
Thank you for your continued support.android android-studio
I got there looking into a similar problem myself.
I found this document about API24 and later restrictions.
The native library uses only public APIs and should not be linked to non-NDK platform libraries.API24
From the , this rule is applied and applications are no longer able to read non-NDK platform libraries.Because this rule is enforced by dynamic linkers, non-public libraries are not accessible regardless of how the code is read.System.loadLibrary, DT_NEEDED
Entries and direct calls to dlopen(3) all behave exactly the same way.
© 2023 OneMinuteCode. All rights reserved.