如何加载库.so文件到Android应用程序? [英] How to load a library .so file into android application?
本文介绍了如何加载库.so文件到Android应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能告诉我一个.so文件给我们需要的马蹄莲 JNI
方法的应用程序?该.so文件中包含 C
实施办法。
先谢谢了。
Can anyone tell me with an .so file given we need to calla jni
method in app? The .so file contains implementation methods in C
.
Thanks in advance.
推荐答案
使用code ..
public class NativeLib {
static {
System.loadLibrary("ndk_demo");
}
/**
* Adds two integers, returning their sum
*/
public native int add( int v1, int v2 );
/**
* Returns Hello World string
*/
public native String hello();
}
有关更多信息.. http://marakana.com/forums/android/examples /49.html
这篇关于如何加载库.so文件到Android应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文