摘要:
转:http://www.cnblogs.com/fww330666557/archive/2012/12/14/2817387.html第一步:在Eclipse中创建android项目,并声明Native接口:public native int add (int a, int b);public native int sub (int a, int b);编译、运行;这样在bin目录下就会生成类文件;第二步:打开命令行cmd,到达bin目录:F:\fww\workspace\TestJNI\bin>输入如下命令:F:\fww\workspace\TestJNI\bin>javah 阅读全文
摘要:
转:http://www.cnblogs.com/fww330666557/archive/2012/12/14/2817386.html一、配置好Android开发环境二、下载安装安卓NDK http://developer.android.com/tools/sdk/ndk/index.html三、下载安装cygwin 由于NDK编译代码时必须要用到make和gcc,所以你必须先搭建一个linux环境,cygwin是一个在windows平台上运行的unix模拟环境,它对于学习unix/linux操作环境,或者从unix到windows的应用程序移植,非常有用。通过它,你就可以在不安装... 阅读全文
摘要:
转:http://www.cnblogs.com/fww330666557/archive/2012/12/14/2817385.html一、What is the NDK?The Android NDK is a toolset that lets you embed components that make use of native code in your Android applications.Android applications run in the Dalvik virtual machine. The NDK allows you to implement parts o 阅读全文