开发者

How native library be executed in Android?

开发者 https://www.devze.com 2023-02-10 17:52 出处:网络
I am thinking about when an android application load a native library, how the library be executed? The dex file in apk is executed by the dalvik VM, but whe开发者_如何学Cn the logic in OPcodes calls

I am thinking about when an android application load a native library, how the library be executed? The dex file in apk is executed by the dalvik VM, but whe开发者_如何学Cn the logic in OPcodes calls a method in a library(not in dex format), does the VM suspend and wait for the process(that this app & VM is running on) to execute the library? Thanks


You call the native library through JNI. you could read more from here about how JNI works:

http://java.sun.com/docs/books/jni/html/jniTOC.html


Here is the good example How to build native Code and use it http://www.aton.com/android-native-libraries-for-java-applications/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号