Android NDK应用开发
Android NDK开发(Ubuntu 10)
1. 下载Android NDK
http://dl.google.com/android/ndk/android-ndk-r4b-linux-x86.zip
2. 配置NDK环境
$>vi ~/.bashrc
增加:
NDK=~/Android/android-ndk-r4b
export NDK
3. 编写代码
Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := jniDemo
LOCAL_SRC_FILES := com_test_android_jni_Jni.c
include $(BUILD_SHARED_LIBRARY)
4. 编译
用两种方法:
1)在目标工程目录下编译:
$NDK/ndk-build
2) 在任意目录下编译:
$NDK/ndk-build -C ~/yournkd/sample/hello-jni
相关推荐
绿豆饼 2020-05-26
hqulyc 2020-04-22
zhongzhiwei 2020-05-07
Jemy杰 2012-07-08
yuemeng0 2012-07-08
zuihaobushi 2012-07-08
yinbaoshiguang 2010-08-29
Urchindong 2010-08-17
luoj 2011-02-20
老菜鸟自习室 2011-02-18
yuanzhiweiss 2011-08-22
wintering 2011-08-20
nickey 2011-08-17
newtrekWang 2011-08-16
西木 2011-08-16
taiyuanwuyin 2011-08-16
移动视频探索者 2011-04-28
taiyuanwuyin 2011-10-26