Reputation: 324
I am working on call recording
app where i am unable to record incoming voice in some device like Samsung S7, Gionee A1 and some other Nougat Devices. So I decided to use NDK for the purpose and added libmedia.so
and libutils.so
files in libs folder as these .so files are needed but getting this error
java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib64/libmedia.so" needed or dlopened by "/system/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
Please help me to resolve this thanks in advance.
Upvotes: 1
Views: 3278
Reputation: 10509
Sounds like you already know this, but just in case:
libmedia is not an NDK API, and access to Android implementation details was restricted in Android N: https://developer.android.com/about/versions/nougat/android-7.0-changes#ndk
You need to use public APIs in apps (those that are accessible in the NDK without having to extern
them or pull libraries off the device).
and added libmedia.so and libutils.so files in libs folder
What libs folder? If it was the lib folder in the APK then those libraries should be the ones loaded by your app rather than the ones in /system/lib64. Are you sure you got them in the right path in the APK?
Upvotes: -1