Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6570715
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: C/C++

2015-09-14 21:58:08

可以以  http://blog.csdn.net/bupt073114/article/details/43114223  示例

++++++++ 在CentOS 7
android-ndk-r10d-linux-x86_64.bin  --->  /opt/android-on-linux/android-ndk-r10d
# gedit /root/.bash_profile
export PATH=$PATH:/opt/android-on-linux/android-ndk-r10d


[root@localhost jni]# pwd
/opt/eclipse-workspace/socket/jni
[root@localhost jni]# ls
Android.mk  cli.c  serv.c
[root@localhost jni]# ndk-build
[armeabi] Install        : cli => libs/armeabi/cli
[armeabi] Install        : serv => libs/armeabi/serv
[root@localhost jni]# ls ../libs/armeabi/
cli  serv
[root@localhost jni]# cd ../libs/armeabi/
[root@localhost armeabi]# adb push serv /data/data/
197 KB/s (9464 bytes in 0.046s)
[root@localhost armeabi]# adb push cli /data/data/
198 KB/s (9464 bytes in 0.046s)
[root@localhost armeabi]#

+++++++++ Android (ARM)
root@mb526:/data/data # ./serv                                                                                                        
asdf
asdf

+++++++++ Android (ARM)
root@mb526:/data/data # ./cli
asdf
asdf
asdf
asdf
asdf
asdf





阅读(817) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~