centos 6 下开发android ,sdk ndk环境搭建
环境搭建参考:
http://blog.sina.com.cn/s/blog_6c728a0401019ckp.html
遇到的问题:
1.NDK的安装问题 执行./ndkfilename.bin时出错
bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
参考:http://blog.csdn.net/orangleliu/article/details/8869626
执行 yum install libstdc++.so.6 又出错
继续使用 yum list | grep libstdc 查询相关包 下载x86_64 系列
2.编译NDK出现问题 执行ndk-build 出错
/android-ndk-r10c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86/bin/../lib/gcc/aarch64-linux-android/4.9/../../../../aarch64-linux-android/bin/as: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make: *** [obj/local/arm64-v8a/objs-debug/hello-jni/hello-jni.o] Error 1
解决:下载zlibz库
yum list | grep zlib
yum install zlib.x86_64
3.修改/etc/profile后 需要执行
source /etc/profile 生效