not found libc++.so

Problem: the installation of install depends on the APK with so library, so it can’t load so normally. Error: not found libc + +. So
for example: system. Loadlibrary (“inittest”);

analysis:

    on Android/prebuilds/tools/GCC SDK, run the following command:
    readelf – DW libinittest. So
    to view the dynamic dependency Library of libinittest. So. Since relying on libc + +. So Android n, Google has contracted the dependent permissions of so library. Only the application under system/APP system/priv app can be relied on. Some so libraries cannot be loaded by the installation application under data/APP
    the following/system/etc/public.libraries.txt is the white list of dynamically dependent libraries. Libc + +. So is not among them

    libandroid.so
    libaaudio.so
    libamidi.so
    libbinder_ndk.so
    libc.so
    libcamera2ndk.so
    libdl.so
    libEGL.so
    libGLESv1_CM.so
    libGLESv2.so
    libGLESv3.so
    libicui18n.so
    libicuuc.so
    libjnigraphics.so
    liblog.so
    libmediandk.so
    libm.so
    libnativewindow.so
    libneuralnetworks.so
    libOpenMAXAL.so
    libOpenSLES.so
    libRS.so
    libstdc++.so
    libsync.so
    libvulkan.so
    libwebviewchromium_plat_support.so
    libz.so
    

    Scheme 1:
    add libc + +. So to the white list

    Scheme 2:
    add the following configuration in the source code android.mk of libinittest.so:

    LOCAL_NDK_STL_VARIANT := c++_static
    LOCAL_SDK_VERSION := 8
    

    Scheme 3:
    copy libc + +. So to the same level directory of libinittest.so in your app to generate APK.

Read More: