loading library (.so file) in android [duplicate]

泄露秘密 提交于 2019-12-11 22:55:06

问题


Possible Duplicate:
Creating a product SDK: How do I add a native lib (.SO) and a jar with the SDK I am creating?

I'm trying to use com.android.SystemClock in an app, which calls a native method. I need to load the library that this native method belongs to (i.e. System.loadLibrary(...)). The method is defined in the file: frameworks/base/core/jni/android_os_SystemClock.cpp. How do I figure out which library this belongs to and load it as well?


回答1:


Inspect the make files and find out what libs it builds. Look for LOCAL_MODULE. That said, it is probably in libandroid_runtime.so.

And then again, if it is not part of the public SDK, you shouldn't be using it. It may change, break, not work on some devices, etc.



来源:https://stackoverflow.com/questions/9204171/loading-library-so-file-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!