Skip to content Skip to sidebar Skip to footer

Library Is Not Accessible For The Namespace "classloader-namespace"

I want to import below libraries in my Android Studio Project these are placed in /system/lib64/ folder. I am getting below error 2020-01-06 13:23:31.358 5171-5171/org.strongswan.a

Solution 1:

From Nougat onwards, Android prevents the runtime linkage of private symbols from system libraries (see this blogpost in Android Developers). You have two options:

  1. Include those libraries in your APK so that you don't need to look for them in /system/lib/; or
  2. Modify your Android ROM so that those libraries are considered public. This can be done by adding those libraries to /system/etc/public.libraries.txt.

Solution 2:

I also met this error. My observation follows,

Error cases:

  1. While placing so file in libs/yourCpuModel(armeabi-v7a)/ directory this error occurs.

  2. While placing so file in src/jniLibs/youtCpuModel(armeabi-v7a)/ directory this error occurs.

But, when I placed so file in src/main/jniLibs/yourCpuModel(armeabi-v7a)/ no error occured.

I don't know why. Maybe helpful to you.

Post a Comment for "Library Is Not Accessible For The Namespace "classloader-namespace""