利用NDK生成.so文件

1.选中工程,点击右键-->Properties-->Builders-->New,新建立一个Builder,在弹出的对话框上点中Program,点击OK;

2.在弹出对话框EditConfiguration中,配置选项卡Main:Location中填入NDK安装目录,D:\ProgramFiles\Android\android-sdk\android-ndk-r9\ndk-build.cmd;WorkingDirectory中填入工程的根目录,E:\Test\Android\HelloJni,点击Apply;

3.配置选项卡Refresh,勾选Refreshresources upon completion, The entire workspace, Recursively includesub-folders,点击Apply;

4.配置Build Options选项卡,勾选Allocate Console(necessary for input), After a “Clean”, Duringmanual builds, During auto builds, Specify working set of relevant resources,点击SpecifyResources..,勾选TestJNI工程的jni目录,点击Finish,点击Apply,点击OK,会在\libs\armeabi目录下生成相应的libhello-jni.so库;

你可能感兴趣的:(利用NDK生成.so文件)