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/
精彩评论