How to detect which native shared libraries are loaded by Android application

前端 未结 2 1615
终归单人心
终归单人心 2020-12-16 02:21

My application uses native shared library (.so), I am loading it by calling System.loadLibrary(\"xxx\"). It loads fine and I can call the native methods.

2条回答
  •  醉话见心
    2020-12-16 02:40

    Use this code to list the shared native libraries that can be loaded from your app:

    final File nativeLibraryDir = new File(getApplicationInfo().nativeLibraryDir);
    final String[] primaryNativeLibraries = nativeLibraryDir.list();
    

提交回复
热议问题